@erikey/react 0.1.7 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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,2334 @@ 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
+ social: <FetchOptions extends {
2240
+ credentials?: RequestCredentials | undefined;
2241
+ method?: string | undefined;
2242
+ headers?: (HeadersInit & (HeadersInit | {
2243
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2244
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2245
+ authorization: "Bearer" | "Basic";
2246
+ })) | undefined;
2247
+ cache?: RequestCache | undefined;
2248
+ integrity?: string | undefined;
2249
+ keepalive?: boolean | undefined;
2250
+ mode?: RequestMode | undefined;
2251
+ priority?: RequestPriority | undefined;
2252
+ redirect?: RequestRedirect | undefined;
2253
+ referrer?: string | undefined;
2254
+ referrerPolicy?: ReferrerPolicy | undefined;
2255
+ signal?: (AbortSignal | null) | undefined;
2256
+ window?: null | undefined;
2257
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2258
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2259
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2260
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2261
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2262
+ hookOptions?: {
2263
+ cloneResponse?: boolean;
2264
+ } | undefined;
2265
+ timeout?: number | undefined;
2266
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2267
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2268
+ baseURL?: string | undefined;
2269
+ throw?: boolean | undefined;
2270
+ auth?: ({
2271
+ type: "Bearer";
2272
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2273
+ } | {
2274
+ type: "Basic";
2275
+ username: string | (() => string | undefined) | undefined;
2276
+ password: string | (() => string | undefined) | undefined;
2277
+ } | {
2278
+ type: "Custom";
2279
+ prefix: string | (() => string | undefined) | undefined;
2280
+ value: string | (() => string | undefined) | undefined;
2281
+ }) | undefined;
2282
+ body?: (Partial<{
2283
+ provider: unknown;
2284
+ callbackURL?: string | undefined;
2285
+ newUserCallbackURL?: string | undefined;
2286
+ errorCallbackURL?: string | undefined;
2287
+ disableRedirect?: boolean | undefined;
2288
+ idToken?: {
2289
+ token: string;
2290
+ nonce?: string | undefined;
2291
+ accessToken?: string | undefined;
2292
+ refreshToken?: string | undefined;
2293
+ expiresAt?: number | undefined;
2294
+ } | undefined;
2295
+ scopes?: string[] | undefined;
2296
+ requestSignUp?: boolean | undefined;
2297
+ loginHint?: string | undefined;
2298
+ }> & Record<string, any>) | undefined;
2299
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2300
+ params?: Record<string, any> | undefined;
2301
+ duplex?: "full" | "half" | undefined;
2302
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2303
+ retry?: better_auth_react.RetryOptions | undefined;
2304
+ retryAttempt?: number | undefined;
2305
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2306
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2307
+ disableValidation?: boolean | undefined;
2308
+ }>(data_0: better_auth.Prettify<{
2309
+ provider: unknown;
2310
+ callbackURL?: string | undefined;
2311
+ newUserCallbackURL?: string | undefined;
2312
+ errorCallbackURL?: string | undefined;
2313
+ disableRedirect?: boolean | undefined;
2314
+ idToken?: {
2315
+ token: string;
2316
+ nonce?: string | undefined;
2317
+ accessToken?: string | undefined;
2318
+ refreshToken?: string | undefined;
2319
+ expiresAt?: number | undefined;
2320
+ } | undefined;
2321
+ scopes?: string[] | undefined;
2322
+ requestSignUp?: boolean | undefined;
2323
+ loginHint?: string | undefined;
2324
+ } & {
2325
+ fetchOptions?: FetchOptions | undefined;
2326
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
2327
+ redirect: boolean;
2328
+ token: string;
2329
+ url: undefined;
2330
+ user: {
2331
+ id: string;
2332
+ email: string;
2333
+ name: string;
2334
+ image: string | null | undefined;
2335
+ emailVerified: boolean;
2336
+ createdAt: Date;
2337
+ updatedAt: Date;
2338
+ };
2339
+ } | {
2340
+ url: string;
2341
+ redirect: boolean;
2342
+ }>, {
2343
+ code?: string;
2344
+ message?: string;
2345
+ }, FetchOptions["throw"] extends true ? true : false>>;
2346
+ };
2347
+ } & {
2348
+ signOut: <FetchOptions extends {
2349
+ credentials?: RequestCredentials | undefined;
2350
+ method?: string | undefined;
2351
+ headers?: (HeadersInit & (HeadersInit | {
2352
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2353
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2354
+ authorization: "Bearer" | "Basic";
2355
+ })) | undefined;
2356
+ cache?: RequestCache | undefined;
2357
+ integrity?: string | undefined;
2358
+ keepalive?: boolean | undefined;
2359
+ mode?: RequestMode | undefined;
2360
+ priority?: RequestPriority | undefined;
2361
+ redirect?: RequestRedirect | undefined;
2362
+ referrer?: string | undefined;
2363
+ referrerPolicy?: ReferrerPolicy | undefined;
2364
+ signal?: (AbortSignal | null) | undefined;
2365
+ window?: null | undefined;
2366
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2367
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2368
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2369
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2370
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2371
+ hookOptions?: {
2372
+ cloneResponse?: boolean;
2373
+ } | undefined;
2374
+ timeout?: number | undefined;
2375
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2376
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2377
+ baseURL?: string | undefined;
2378
+ throw?: boolean | undefined;
2379
+ auth?: ({
2380
+ type: "Bearer";
2381
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2382
+ } | {
2383
+ type: "Basic";
2384
+ username: string | (() => string | undefined) | undefined;
2385
+ password: string | (() => string | undefined) | undefined;
2386
+ } | {
2387
+ type: "Custom";
2388
+ prefix: string | (() => string | undefined) | undefined;
2389
+ value: string | (() => string | undefined) | undefined;
2390
+ }) | undefined;
2391
+ body?: undefined;
2392
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2393
+ params?: Record<string, any> | undefined;
2394
+ duplex?: "full" | "half" | undefined;
2395
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2396
+ retry?: better_auth_react.RetryOptions | undefined;
2397
+ retryAttempt?: number | undefined;
2398
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2399
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2400
+ disableValidation?: boolean | undefined;
2401
+ }>(data_0?: better_auth.Prettify<{
2402
+ query?: Record<string, any> | undefined;
2403
+ fetchOptions?: FetchOptions | undefined;
2404
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2405
+ success: boolean;
2406
+ }, {
2407
+ code?: string;
2408
+ message?: string;
2409
+ }, FetchOptions["throw"] extends true ? true : false>>;
2410
+ } & {
2411
+ signUp: {
2412
+ email: <FetchOptions extends {
2413
+ credentials?: RequestCredentials | undefined;
2414
+ method?: string | undefined;
2415
+ headers?: (HeadersInit & (HeadersInit | {
2416
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2417
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2418
+ authorization: "Bearer" | "Basic";
2419
+ })) | undefined;
2420
+ cache?: RequestCache | undefined;
2421
+ integrity?: string | undefined;
2422
+ keepalive?: boolean | undefined;
2423
+ mode?: RequestMode | undefined;
2424
+ priority?: RequestPriority | undefined;
2425
+ redirect?: RequestRedirect | undefined;
2426
+ referrer?: string | undefined;
2427
+ referrerPolicy?: ReferrerPolicy | undefined;
2428
+ signal?: (AbortSignal | null) | undefined;
2429
+ window?: null | undefined;
2430
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2431
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2432
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2433
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2434
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2435
+ hookOptions?: {
2436
+ cloneResponse?: boolean;
2437
+ } | undefined;
2438
+ timeout?: number | undefined;
2439
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2440
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2441
+ baseURL?: string | undefined;
2442
+ throw?: boolean | undefined;
2443
+ auth?: ({
2444
+ type: "Bearer";
2445
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2446
+ } | {
2447
+ type: "Basic";
2448
+ username: string | (() => string | undefined) | undefined;
2449
+ password: string | (() => string | undefined) | undefined;
2450
+ } | {
2451
+ type: "Custom";
2452
+ prefix: string | (() => string | undefined) | undefined;
2453
+ value: string | (() => string | undefined) | undefined;
2454
+ }) | undefined;
2455
+ body?: (Partial<{
2456
+ name: string;
2457
+ email: string;
2458
+ password: string;
2459
+ image?: string;
2460
+ callbackURL?: string;
2461
+ rememberMe?: boolean;
2462
+ }> & Record<string, any>) | undefined;
2463
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2464
+ params?: Record<string, any> | undefined;
2465
+ duplex?: "full" | "half" | undefined;
2466
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2467
+ retry?: better_auth_react.RetryOptions | undefined;
2468
+ retryAttempt?: number | undefined;
2469
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2470
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2471
+ disableValidation?: boolean | undefined;
2472
+ }>(data_0: better_auth.Prettify<{
2473
+ email: string;
2474
+ name: string;
2475
+ password: string;
2476
+ image?: string;
2477
+ callbackURL?: string;
2478
+ fetchOptions?: FetchOptions | undefined;
2479
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<{
2480
+ token: null;
2481
+ user: {
2482
+ id: string;
2483
+ email: string;
2484
+ name: string;
2485
+ image: string | null | undefined;
2486
+ emailVerified: boolean;
2487
+ createdAt: Date;
2488
+ updatedAt: Date;
2489
+ };
2490
+ } | {
2491
+ token: string;
2492
+ user: {
2493
+ id: string;
2494
+ email: string;
2495
+ name: string;
2496
+ image: string | null | undefined;
2497
+ emailVerified: boolean;
2498
+ createdAt: Date;
2499
+ updatedAt: Date;
2500
+ };
2501
+ }>, {
2502
+ code?: string;
2503
+ message?: string;
2504
+ }, FetchOptions["throw"] extends true ? true : false>>;
2505
+ };
2506
+ } & {
2507
+ signIn: {
2508
+ email: <FetchOptions extends {
2509
+ credentials?: RequestCredentials | undefined;
2510
+ method?: string | undefined;
2511
+ headers?: (HeadersInit & (HeadersInit | {
2512
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2513
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2514
+ authorization: "Bearer" | "Basic";
2515
+ })) | undefined;
2516
+ cache?: RequestCache | undefined;
2517
+ integrity?: string | undefined;
2518
+ keepalive?: boolean | undefined;
2519
+ mode?: RequestMode | undefined;
2520
+ priority?: RequestPriority | undefined;
2521
+ redirect?: RequestRedirect | undefined;
2522
+ referrer?: string | undefined;
2523
+ referrerPolicy?: ReferrerPolicy | undefined;
2524
+ signal?: (AbortSignal | null) | undefined;
2525
+ window?: null | undefined;
2526
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2527
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2528
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2529
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2530
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2531
+ hookOptions?: {
2532
+ cloneResponse?: boolean;
2533
+ } | undefined;
2534
+ timeout?: number | undefined;
2535
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2536
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2537
+ baseURL?: string | undefined;
2538
+ throw?: boolean | undefined;
2539
+ auth?: ({
2540
+ type: "Bearer";
2541
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2542
+ } | {
2543
+ type: "Basic";
2544
+ username: string | (() => string | undefined) | undefined;
2545
+ password: string | (() => string | undefined) | undefined;
2546
+ } | {
2547
+ type: "Custom";
2548
+ prefix: string | (() => string | undefined) | undefined;
2549
+ value: string | (() => string | undefined) | undefined;
2550
+ }) | undefined;
2551
+ body?: (Partial<{
2552
+ email: string;
2553
+ password: string;
2554
+ callbackURL?: string | undefined;
2555
+ rememberMe?: boolean | undefined;
2556
+ }> & Record<string, any>) | undefined;
2557
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2558
+ params?: Record<string, any> | undefined;
2559
+ duplex?: "full" | "half" | undefined;
2560
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2561
+ retry?: better_auth_react.RetryOptions | undefined;
2562
+ retryAttempt?: number | undefined;
2563
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2564
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2565
+ disableValidation?: boolean | undefined;
2566
+ }>(data_0: better_auth.Prettify<{
2567
+ email: string;
2568
+ password: string;
2569
+ callbackURL?: string | undefined;
2570
+ rememberMe?: boolean | undefined;
2571
+ } & {
2572
+ fetchOptions?: FetchOptions | undefined;
2573
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2574
+ redirect: boolean;
2575
+ token: string;
2576
+ url: string | undefined;
2577
+ user: {
2578
+ id: string;
2579
+ email: string;
2580
+ name: string;
2581
+ image: string | null | undefined;
2582
+ emailVerified: boolean;
2583
+ createdAt: Date;
2584
+ updatedAt: Date;
2585
+ };
2586
+ }, {
2587
+ code?: string;
2588
+ message?: string;
2589
+ }, FetchOptions["throw"] extends true ? true : false>>;
2590
+ };
2591
+ } & {
2592
+ forgetPassword: <FetchOptions extends {
2593
+ credentials?: RequestCredentials | undefined;
2594
+ method?: string | undefined;
2595
+ headers?: (HeadersInit & (HeadersInit | {
2596
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2597
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2598
+ authorization: "Bearer" | "Basic";
2599
+ })) | undefined;
2600
+ cache?: RequestCache | undefined;
2601
+ integrity?: string | undefined;
2602
+ keepalive?: boolean | undefined;
2603
+ mode?: RequestMode | undefined;
2604
+ priority?: RequestPriority | undefined;
2605
+ redirect?: RequestRedirect | undefined;
2606
+ referrer?: string | undefined;
2607
+ referrerPolicy?: ReferrerPolicy | undefined;
2608
+ signal?: (AbortSignal | null) | undefined;
2609
+ window?: null | undefined;
2610
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2611
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2612
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2613
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2614
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2615
+ hookOptions?: {
2616
+ cloneResponse?: boolean;
2617
+ } | undefined;
2618
+ timeout?: number | undefined;
2619
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2620
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2621
+ baseURL?: string | undefined;
2622
+ throw?: boolean | undefined;
2623
+ auth?: ({
2624
+ type: "Bearer";
2625
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2626
+ } | {
2627
+ type: "Basic";
2628
+ username: string | (() => string | undefined) | undefined;
2629
+ password: string | (() => string | undefined) | undefined;
2630
+ } | {
2631
+ type: "Custom";
2632
+ prefix: string | (() => string | undefined) | undefined;
2633
+ value: string | (() => string | undefined) | undefined;
2634
+ }) | undefined;
2635
+ body?: (Partial<{
2636
+ email: string;
2637
+ redirectTo?: string | undefined;
2638
+ }> & Record<string, any>) | undefined;
2639
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2640
+ params?: Record<string, any> | undefined;
2641
+ duplex?: "full" | "half" | undefined;
2642
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2643
+ retry?: better_auth_react.RetryOptions | undefined;
2644
+ retryAttempt?: number | undefined;
2645
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2646
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2647
+ disableValidation?: boolean | undefined;
2648
+ }>(data_0: better_auth.Prettify<{
2649
+ email: string;
2650
+ redirectTo?: string | undefined;
2651
+ } & {
2652
+ fetchOptions?: FetchOptions | undefined;
2653
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2654
+ status: boolean;
2655
+ }, {
2656
+ code?: string;
2657
+ message?: string;
2658
+ }, FetchOptions["throw"] extends true ? true : false>>;
2659
+ } & {
2660
+ resetPassword: <FetchOptions extends {
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?: (Partial<{
2704
+ newPassword: string;
2705
+ token?: string | undefined;
2706
+ }> & Record<string, any>) | undefined;
2707
+ query?: (Partial<{
2708
+ token?: string | undefined;
2709
+ }> & Record<string, any>) | undefined;
2710
+ params?: Record<string, any> | undefined;
2711
+ duplex?: "full" | "half" | undefined;
2712
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2713
+ retry?: better_auth_react.RetryOptions | undefined;
2714
+ retryAttempt?: number | undefined;
2715
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2716
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2717
+ disableValidation?: boolean | undefined;
2718
+ }>(data_0: better_auth.Prettify<{
2719
+ newPassword: string;
2720
+ token?: string | undefined;
2721
+ } & {
2722
+ fetchOptions?: FetchOptions | undefined;
2723
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2724
+ status: boolean;
2725
+ }, {
2726
+ code?: string;
2727
+ message?: string;
2728
+ }, FetchOptions["throw"] extends true ? true : false>>;
2729
+ } & {
2730
+ verifyEmail: <FetchOptions extends {
2731
+ credentials?: RequestCredentials | undefined;
2732
+ method?: string | undefined;
2733
+ headers?: (HeadersInit & (HeadersInit | {
2734
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2735
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2736
+ authorization: "Bearer" | "Basic";
2737
+ })) | undefined;
2738
+ cache?: RequestCache | undefined;
2739
+ integrity?: string | undefined;
2740
+ keepalive?: boolean | undefined;
2741
+ mode?: RequestMode | undefined;
2742
+ priority?: RequestPriority | undefined;
2743
+ redirect?: RequestRedirect | undefined;
2744
+ referrer?: string | undefined;
2745
+ referrerPolicy?: ReferrerPolicy | undefined;
2746
+ signal?: (AbortSignal | null) | undefined;
2747
+ window?: null | undefined;
2748
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2749
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2750
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2751
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2752
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2753
+ hookOptions?: {
2754
+ cloneResponse?: boolean;
2755
+ } | undefined;
2756
+ timeout?: number | undefined;
2757
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2758
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2759
+ baseURL?: string | undefined;
2760
+ throw?: boolean | undefined;
2761
+ auth?: ({
2762
+ type: "Bearer";
2763
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2764
+ } | {
2765
+ type: "Basic";
2766
+ username: string | (() => string | undefined) | undefined;
2767
+ password: string | (() => string | undefined) | undefined;
2768
+ } | {
2769
+ type: "Custom";
2770
+ prefix: string | (() => string | undefined) | undefined;
2771
+ value: string | (() => string | undefined) | undefined;
2772
+ }) | undefined;
2773
+ body?: undefined;
2774
+ query?: (Partial<{
2775
+ token: string;
2776
+ callbackURL?: string | undefined;
2777
+ }> & Record<string, any>) | undefined;
2778
+ params?: Record<string, any> | undefined;
2779
+ duplex?: "full" | "half" | undefined;
2780
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2781
+ retry?: better_auth_react.RetryOptions | undefined;
2782
+ retryAttempt?: number | undefined;
2783
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2784
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2785
+ disableValidation?: boolean | undefined;
2786
+ }>(data_0: better_auth.Prettify<{
2787
+ query: {
2788
+ token: string;
2789
+ callbackURL?: string | undefined;
2790
+ };
2791
+ fetchOptions?: FetchOptions | undefined;
2792
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<NonNullable<void | {
2793
+ status: boolean;
2794
+ user: {
2795
+ id: string;
2796
+ email: string;
2797
+ name: string;
2798
+ image: string | null | undefined;
2799
+ emailVerified: boolean;
2800
+ createdAt: Date;
2801
+ updatedAt: Date;
2802
+ };
2803
+ } | {
2804
+ status: boolean;
2805
+ user: null;
2806
+ }>, {
2807
+ code?: string;
2808
+ message?: string;
2809
+ }, FetchOptions["throw"] extends true ? true : false>>;
2810
+ } & {
2811
+ sendVerificationEmail: <FetchOptions extends {
2812
+ credentials?: RequestCredentials | undefined;
2813
+ method?: string | undefined;
2814
+ headers?: (HeadersInit & (HeadersInit | {
2815
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2816
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2817
+ authorization: "Bearer" | "Basic";
2818
+ })) | undefined;
2819
+ cache?: RequestCache | undefined;
2820
+ integrity?: string | undefined;
2821
+ keepalive?: boolean | undefined;
2822
+ mode?: RequestMode | undefined;
2823
+ priority?: RequestPriority | undefined;
2824
+ redirect?: RequestRedirect | undefined;
2825
+ referrer?: string | undefined;
2826
+ referrerPolicy?: ReferrerPolicy | undefined;
2827
+ signal?: (AbortSignal | null) | undefined;
2828
+ window?: null | undefined;
2829
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2830
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2831
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2832
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2833
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2834
+ hookOptions?: {
2835
+ cloneResponse?: boolean;
2836
+ } | undefined;
2837
+ timeout?: number | undefined;
2838
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2839
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2840
+ baseURL?: string | undefined;
2841
+ throw?: boolean | undefined;
2842
+ auth?: ({
2843
+ type: "Bearer";
2844
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2845
+ } | {
2846
+ type: "Basic";
2847
+ username: string | (() => string | undefined) | undefined;
2848
+ password: string | (() => string | undefined) | undefined;
2849
+ } | {
2850
+ type: "Custom";
2851
+ prefix: string | (() => string | undefined) | undefined;
2852
+ value: string | (() => string | undefined) | undefined;
2853
+ }) | undefined;
2854
+ body?: (Partial<{
2855
+ email: string;
2856
+ callbackURL?: string | undefined;
2857
+ }> & Record<string, any>) | undefined;
2858
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2859
+ params?: Record<string, any> | undefined;
2860
+ duplex?: "full" | "half" | undefined;
2861
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2862
+ retry?: better_auth_react.RetryOptions | undefined;
2863
+ retryAttempt?: number | undefined;
2864
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2865
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2866
+ disableValidation?: boolean | undefined;
2867
+ }>(data_0: better_auth.Prettify<{
2868
+ email: string;
2869
+ callbackURL?: string | undefined;
2870
+ } & {
2871
+ fetchOptions?: FetchOptions | undefined;
2872
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2873
+ status: boolean;
2874
+ }, {
2875
+ code?: string;
2876
+ message?: string;
2877
+ }, FetchOptions["throw"] extends true ? true : false>>;
2878
+ } & {
2879
+ changeEmail: <FetchOptions extends {
2880
+ credentials?: RequestCredentials | undefined;
2881
+ method?: string | undefined;
2882
+ headers?: (HeadersInit & (HeadersInit | {
2883
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2884
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2885
+ authorization: "Bearer" | "Basic";
2886
+ })) | undefined;
2887
+ cache?: RequestCache | undefined;
2888
+ integrity?: string | undefined;
2889
+ keepalive?: boolean | undefined;
2890
+ mode?: RequestMode | undefined;
2891
+ priority?: RequestPriority | undefined;
2892
+ redirect?: RequestRedirect | undefined;
2893
+ referrer?: string | undefined;
2894
+ referrerPolicy?: ReferrerPolicy | undefined;
2895
+ signal?: (AbortSignal | null) | undefined;
2896
+ window?: null | undefined;
2897
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2898
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2899
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2900
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2901
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2902
+ hookOptions?: {
2903
+ cloneResponse?: boolean;
2904
+ } | undefined;
2905
+ timeout?: number | undefined;
2906
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2907
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2908
+ baseURL?: string | undefined;
2909
+ throw?: boolean | undefined;
2910
+ auth?: ({
2911
+ type: "Bearer";
2912
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2913
+ } | {
2914
+ type: "Basic";
2915
+ username: string | (() => string | undefined) | undefined;
2916
+ password: string | (() => string | undefined) | undefined;
2917
+ } | {
2918
+ type: "Custom";
2919
+ prefix: string | (() => string | undefined) | undefined;
2920
+ value: string | (() => string | undefined) | undefined;
2921
+ }) | undefined;
2922
+ body?: (Partial<{
2923
+ newEmail: string;
2924
+ callbackURL?: string | undefined;
2925
+ }> & Record<string, any>) | undefined;
2926
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2927
+ params?: Record<string, any> | undefined;
2928
+ duplex?: "full" | "half" | undefined;
2929
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2930
+ retry?: better_auth_react.RetryOptions | undefined;
2931
+ retryAttempt?: number | undefined;
2932
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2933
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
2934
+ disableValidation?: boolean | undefined;
2935
+ }>(data_0: better_auth.Prettify<{
2936
+ newEmail: string;
2937
+ callbackURL?: string | undefined;
2938
+ } & {
2939
+ fetchOptions?: FetchOptions | undefined;
2940
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
2941
+ status: boolean;
2942
+ }, {
2943
+ code?: string;
2944
+ message?: string;
2945
+ }, FetchOptions["throw"] extends true ? true : false>>;
2946
+ } & {
2947
+ changePassword: <FetchOptions extends {
2948
+ credentials?: RequestCredentials | undefined;
2949
+ method?: string | undefined;
2950
+ headers?: (HeadersInit & (HeadersInit | {
2951
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2952
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2953
+ authorization: "Bearer" | "Basic";
2954
+ })) | undefined;
2955
+ cache?: RequestCache | undefined;
2956
+ integrity?: string | undefined;
2957
+ keepalive?: boolean | undefined;
2958
+ mode?: RequestMode | undefined;
2959
+ priority?: RequestPriority | undefined;
2960
+ redirect?: RequestRedirect | undefined;
2961
+ referrer?: string | undefined;
2962
+ referrerPolicy?: ReferrerPolicy | undefined;
2963
+ signal?: (AbortSignal | null) | undefined;
2964
+ window?: null | undefined;
2965
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
2966
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
2967
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
2968
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
2969
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
2970
+ hookOptions?: {
2971
+ cloneResponse?: boolean;
2972
+ } | undefined;
2973
+ timeout?: number | undefined;
2974
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
2975
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
2976
+ baseURL?: string | undefined;
2977
+ throw?: boolean | undefined;
2978
+ auth?: ({
2979
+ type: "Bearer";
2980
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2981
+ } | {
2982
+ type: "Basic";
2983
+ username: string | (() => string | undefined) | undefined;
2984
+ password: string | (() => string | undefined) | undefined;
2985
+ } | {
2986
+ type: "Custom";
2987
+ prefix: string | (() => string | undefined) | undefined;
2988
+ value: string | (() => string | undefined) | undefined;
2989
+ }) | undefined;
2990
+ body?: (Partial<{
2991
+ newPassword: string;
2992
+ currentPassword: string;
2993
+ revokeOtherSessions?: boolean | undefined;
2994
+ }> & Record<string, any>) | undefined;
2995
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
2996
+ params?: Record<string, any> | undefined;
2997
+ duplex?: "full" | "half" | undefined;
2998
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2999
+ retry?: better_auth_react.RetryOptions | undefined;
3000
+ retryAttempt?: number | undefined;
3001
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3002
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3003
+ disableValidation?: boolean | undefined;
3004
+ }>(data_0: better_auth.Prettify<{
3005
+ newPassword: string;
3006
+ currentPassword: string;
3007
+ revokeOtherSessions?: boolean | undefined;
3008
+ } & {
3009
+ fetchOptions?: FetchOptions | undefined;
3010
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3011
+ token: string | null;
3012
+ user: {
3013
+ id: string;
3014
+ email: string;
3015
+ name: string;
3016
+ image: string | null | undefined;
3017
+ emailVerified: boolean;
3018
+ createdAt: Date;
3019
+ updatedAt: Date;
3020
+ };
3021
+ }, {
3022
+ code?: string;
3023
+ message?: string;
3024
+ }, FetchOptions["throw"] extends true ? true : false>>;
3025
+ } & {
3026
+ updateUser: <FetchOptions extends {
3027
+ credentials?: RequestCredentials | undefined;
3028
+ method?: string | undefined;
3029
+ headers?: (HeadersInit & (HeadersInit | {
3030
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3031
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3032
+ authorization: "Bearer" | "Basic";
3033
+ })) | undefined;
3034
+ cache?: RequestCache | undefined;
3035
+ integrity?: string | undefined;
3036
+ keepalive?: boolean | undefined;
3037
+ mode?: RequestMode | undefined;
3038
+ priority?: RequestPriority | undefined;
3039
+ redirect?: RequestRedirect | undefined;
3040
+ referrer?: string | undefined;
3041
+ referrerPolicy?: ReferrerPolicy | undefined;
3042
+ signal?: (AbortSignal | null) | undefined;
3043
+ window?: null | undefined;
3044
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3045
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3046
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3047
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3048
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3049
+ hookOptions?: {
3050
+ cloneResponse?: boolean;
3051
+ } | undefined;
3052
+ timeout?: number | undefined;
3053
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3054
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3055
+ baseURL?: string | undefined;
3056
+ throw?: boolean | undefined;
3057
+ auth?: ({
3058
+ type: "Bearer";
3059
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3060
+ } | {
3061
+ type: "Basic";
3062
+ username: string | (() => string | undefined) | undefined;
3063
+ password: string | (() => string | undefined) | undefined;
3064
+ } | {
3065
+ type: "Custom";
3066
+ prefix: string | (() => string | undefined) | undefined;
3067
+ value: string | (() => string | undefined) | undefined;
3068
+ }) | undefined;
3069
+ body?: (Partial<Partial<{}> & {
3070
+ name?: string;
3071
+ image?: string;
3072
+ }> & Record<string, any>) | undefined;
3073
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3074
+ params?: Record<string, any> | undefined;
3075
+ duplex?: "full" | "half" | undefined;
3076
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3077
+ retry?: better_auth_react.RetryOptions | undefined;
3078
+ retryAttempt?: number | undefined;
3079
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3080
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3081
+ disableValidation?: boolean | undefined;
3082
+ }>(data_0?: better_auth.Prettify<{
3083
+ image?: string | null;
3084
+ name?: string;
3085
+ fetchOptions?: FetchOptions | undefined;
3086
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3087
+ status: boolean;
3088
+ }, {
3089
+ code?: string;
3090
+ message?: string;
3091
+ }, FetchOptions["throw"] extends true ? true : false>>;
3092
+ } & {
3093
+ deleteUser: <FetchOptions extends {
3094
+ credentials?: RequestCredentials | undefined;
3095
+ method?: string | undefined;
3096
+ headers?: (HeadersInit & (HeadersInit | {
3097
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3098
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3099
+ authorization: "Bearer" | "Basic";
3100
+ })) | undefined;
3101
+ cache?: RequestCache | undefined;
3102
+ integrity?: string | undefined;
3103
+ keepalive?: boolean | undefined;
3104
+ mode?: RequestMode | undefined;
3105
+ priority?: RequestPriority | undefined;
3106
+ redirect?: RequestRedirect | undefined;
3107
+ referrer?: string | undefined;
3108
+ referrerPolicy?: ReferrerPolicy | undefined;
3109
+ signal?: (AbortSignal | null) | undefined;
3110
+ window?: null | undefined;
3111
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3112
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3113
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3114
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3115
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3116
+ hookOptions?: {
3117
+ cloneResponse?: boolean;
3118
+ } | undefined;
3119
+ timeout?: number | undefined;
3120
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3121
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3122
+ baseURL?: string | undefined;
3123
+ throw?: boolean | undefined;
3124
+ auth?: ({
3125
+ type: "Bearer";
3126
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3127
+ } | {
3128
+ type: "Basic";
3129
+ username: string | (() => string | undefined) | undefined;
3130
+ password: string | (() => string | undefined) | undefined;
3131
+ } | {
3132
+ type: "Custom";
3133
+ prefix: string | (() => string | undefined) | undefined;
3134
+ value: string | (() => string | undefined) | undefined;
3135
+ }) | undefined;
3136
+ body?: (Partial<{
3137
+ callbackURL?: string | undefined;
3138
+ password?: string | undefined;
3139
+ token?: string | undefined;
3140
+ }> & Record<string, any>) | undefined;
3141
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3142
+ params?: Record<string, any> | undefined;
3143
+ duplex?: "full" | "half" | undefined;
3144
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3145
+ retry?: better_auth_react.RetryOptions | undefined;
3146
+ retryAttempt?: number | undefined;
3147
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3148
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3149
+ disableValidation?: boolean | undefined;
3150
+ }>(data_0?: better_auth.Prettify<{
3151
+ callbackURL?: string | undefined;
3152
+ password?: string | undefined;
3153
+ token?: string | undefined;
3154
+ } & {
3155
+ fetchOptions?: FetchOptions | undefined;
3156
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3157
+ success: boolean;
3158
+ message: string;
3159
+ }, {
3160
+ code?: string;
3161
+ message?: string;
3162
+ }, FetchOptions["throw"] extends true ? true : false>>;
3163
+ } & {
3164
+ resetPassword: {
3165
+ ":token": <FetchOptions extends {
3166
+ credentials?: RequestCredentials | undefined;
3167
+ method?: string | undefined;
3168
+ headers?: (HeadersInit & (HeadersInit | {
3169
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3170
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3171
+ authorization: "Bearer" | "Basic";
3172
+ })) | undefined;
3173
+ cache?: RequestCache | undefined;
3174
+ integrity?: string | undefined;
3175
+ keepalive?: boolean | undefined;
3176
+ mode?: RequestMode | undefined;
3177
+ priority?: RequestPriority | undefined;
3178
+ redirect?: RequestRedirect | undefined;
3179
+ referrer?: string | undefined;
3180
+ referrerPolicy?: ReferrerPolicy | undefined;
3181
+ signal?: (AbortSignal | null) | undefined;
3182
+ window?: null | undefined;
3183
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3184
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3185
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3186
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3187
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3188
+ hookOptions?: {
3189
+ cloneResponse?: boolean;
3190
+ } | undefined;
3191
+ timeout?: number | undefined;
3192
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3193
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3194
+ baseURL?: string | undefined;
3195
+ throw?: boolean | undefined;
3196
+ auth?: ({
3197
+ type: "Bearer";
3198
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3199
+ } | {
3200
+ type: "Basic";
3201
+ username: string | (() => string | undefined) | undefined;
3202
+ password: string | (() => string | undefined) | undefined;
3203
+ } | {
3204
+ type: "Custom";
3205
+ prefix: string | (() => string | undefined) | undefined;
3206
+ value: string | (() => string | undefined) | undefined;
3207
+ }) | undefined;
3208
+ body?: undefined;
3209
+ query?: (Partial<{
3210
+ callbackURL: string;
3211
+ }> & Record<string, any>) | undefined;
3212
+ params?: {
3213
+ token: string;
3214
+ } | 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
+ callbackURL: string;
3225
+ };
3226
+ fetchOptions?: FetchOptions | undefined;
3227
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
3228
+ code?: string;
3229
+ message?: string;
3230
+ }, FetchOptions["throw"] extends true ? true : false>>;
3231
+ };
3232
+ } & {
3233
+ requestPasswordReset: <FetchOptions extends {
3234
+ credentials?: RequestCredentials | undefined;
3235
+ method?: string | undefined;
3236
+ headers?: (HeadersInit & (HeadersInit | {
3237
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3238
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3239
+ authorization: "Bearer" | "Basic";
3240
+ })) | undefined;
3241
+ cache?: RequestCache | undefined;
3242
+ integrity?: string | undefined;
3243
+ keepalive?: boolean | undefined;
3244
+ mode?: RequestMode | undefined;
3245
+ priority?: RequestPriority | undefined;
3246
+ redirect?: RequestRedirect | undefined;
3247
+ referrer?: string | undefined;
3248
+ referrerPolicy?: ReferrerPolicy | undefined;
3249
+ signal?: (AbortSignal | null) | undefined;
3250
+ window?: null | undefined;
3251
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3252
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3253
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3254
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3255
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3256
+ hookOptions?: {
3257
+ cloneResponse?: boolean;
3258
+ } | undefined;
3259
+ timeout?: number | undefined;
3260
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3261
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3262
+ baseURL?: string | undefined;
3263
+ throw?: boolean | undefined;
3264
+ auth?: ({
3265
+ type: "Bearer";
3266
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3267
+ } | {
3268
+ type: "Basic";
3269
+ username: string | (() => string | undefined) | undefined;
3270
+ password: string | (() => string | undefined) | undefined;
3271
+ } | {
3272
+ type: "Custom";
3273
+ prefix: string | (() => string | undefined) | undefined;
3274
+ value: string | (() => string | undefined) | undefined;
3275
+ }) | undefined;
3276
+ body?: (Partial<{
3277
+ email: string;
3278
+ redirectTo?: string | undefined;
3279
+ }> & Record<string, any>) | undefined;
3280
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3281
+ params?: Record<string, any> | undefined;
3282
+ duplex?: "full" | "half" | undefined;
3283
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3284
+ retry?: better_auth_react.RetryOptions | undefined;
3285
+ retryAttempt?: number | undefined;
3286
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3287
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3288
+ disableValidation?: boolean | undefined;
3289
+ }>(data_0: better_auth.Prettify<{
3290
+ email: string;
3291
+ redirectTo?: string | undefined;
3292
+ } & {
3293
+ fetchOptions?: FetchOptions | undefined;
3294
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3295
+ status: boolean;
3296
+ message: string;
3297
+ }, {
3298
+ code?: string;
3299
+ message?: string;
3300
+ }, FetchOptions["throw"] extends true ? true : false>>;
3301
+ } & {
3302
+ resetPassword: {
3303
+ ":token": <FetchOptions extends {
3304
+ credentials?: RequestCredentials | undefined;
3305
+ method?: string | undefined;
3306
+ headers?: (HeadersInit & (HeadersInit | {
3307
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3308
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3309
+ authorization: "Bearer" | "Basic";
3310
+ })) | undefined;
3311
+ cache?: RequestCache | undefined;
3312
+ integrity?: string | undefined;
3313
+ keepalive?: boolean | undefined;
3314
+ mode?: RequestMode | undefined;
3315
+ priority?: RequestPriority | undefined;
3316
+ redirect?: RequestRedirect | undefined;
3317
+ referrer?: string | undefined;
3318
+ referrerPolicy?: ReferrerPolicy | undefined;
3319
+ signal?: (AbortSignal | null) | undefined;
3320
+ window?: null | undefined;
3321
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3322
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3323
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3324
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3325
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3326
+ hookOptions?: {
3327
+ cloneResponse?: boolean;
3328
+ } | undefined;
3329
+ timeout?: number | undefined;
3330
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3331
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3332
+ baseURL?: string | undefined;
3333
+ throw?: boolean | undefined;
3334
+ auth?: ({
3335
+ type: "Bearer";
3336
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3337
+ } | {
3338
+ type: "Basic";
3339
+ username: string | (() => string | undefined) | undefined;
3340
+ password: string | (() => string | undefined) | undefined;
3341
+ } | {
3342
+ type: "Custom";
3343
+ prefix: string | (() => string | undefined) | undefined;
3344
+ value: string | (() => string | undefined) | undefined;
3345
+ }) | undefined;
3346
+ body?: undefined;
3347
+ query?: (Partial<{
3348
+ callbackURL: string;
3349
+ }> & Record<string, any>) | undefined;
3350
+ params?: {
3351
+ token: string;
3352
+ } | undefined;
3353
+ duplex?: "full" | "half" | undefined;
3354
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3355
+ retry?: better_auth_react.RetryOptions | undefined;
3356
+ retryAttempt?: number | undefined;
3357
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3358
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3359
+ disableValidation?: boolean | undefined;
3360
+ }>(data_0: better_auth.Prettify<{
3361
+ query: {
3362
+ callbackURL: string;
3363
+ };
3364
+ fetchOptions?: FetchOptions | undefined;
3365
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<never, {
3366
+ code?: string;
3367
+ message?: string;
3368
+ }, FetchOptions["throw"] extends true ? true : false>>;
3369
+ };
3370
+ } & {
3371
+ listSessions: <FetchOptions extends {
3372
+ credentials?: RequestCredentials | undefined;
3373
+ method?: string | undefined;
3374
+ headers?: (HeadersInit & (HeadersInit | {
3375
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3376
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3377
+ authorization: "Bearer" | "Basic";
3378
+ })) | undefined;
3379
+ cache?: RequestCache | undefined;
3380
+ integrity?: string | undefined;
3381
+ keepalive?: boolean | undefined;
3382
+ mode?: RequestMode | undefined;
3383
+ priority?: RequestPriority | undefined;
3384
+ redirect?: RequestRedirect | undefined;
3385
+ referrer?: string | undefined;
3386
+ referrerPolicy?: ReferrerPolicy | undefined;
3387
+ signal?: (AbortSignal | null) | undefined;
3388
+ window?: null | undefined;
3389
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3390
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3391
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3392
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3393
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3394
+ hookOptions?: {
3395
+ cloneResponse?: boolean;
3396
+ } | undefined;
3397
+ timeout?: number | undefined;
3398
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3399
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3400
+ baseURL?: string | undefined;
3401
+ throw?: boolean | undefined;
3402
+ auth?: ({
3403
+ type: "Bearer";
3404
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3405
+ } | {
3406
+ type: "Basic";
3407
+ username: string | (() => string | undefined) | undefined;
3408
+ password: string | (() => string | undefined) | undefined;
3409
+ } | {
3410
+ type: "Custom";
3411
+ prefix: string | (() => string | undefined) | undefined;
3412
+ value: string | (() => string | undefined) | undefined;
3413
+ }) | undefined;
3414
+ body?: undefined;
3415
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3416
+ params?: Record<string, any> | undefined;
3417
+ duplex?: "full" | "half" | undefined;
3418
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3419
+ retry?: better_auth_react.RetryOptions | undefined;
3420
+ retryAttempt?: number | undefined;
3421
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3422
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3423
+ disableValidation?: boolean | undefined;
3424
+ }>(data_0?: better_auth.Prettify<{
3425
+ query?: Record<string, any> | undefined;
3426
+ fetchOptions?: FetchOptions | undefined;
3427
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<better_auth.Prettify<{
3428
+ id: string;
3429
+ createdAt: Date;
3430
+ updatedAt: Date;
3431
+ userId: string;
3432
+ expiresAt: Date;
3433
+ token: string;
3434
+ ipAddress?: string | null | undefined | undefined;
3435
+ userAgent?: string | null | undefined | undefined;
3436
+ }>[], {
3437
+ code?: string;
3438
+ message?: string;
3439
+ }, FetchOptions["throw"] extends true ? true : false>>;
3440
+ } & {
3441
+ revokeSession: <FetchOptions extends {
3442
+ credentials?: RequestCredentials | undefined;
3443
+ method?: string | undefined;
3444
+ headers?: (HeadersInit & (HeadersInit | {
3445
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3446
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3447
+ authorization: "Bearer" | "Basic";
3448
+ })) | undefined;
3449
+ cache?: RequestCache | undefined;
3450
+ integrity?: string | undefined;
3451
+ keepalive?: boolean | undefined;
3452
+ mode?: RequestMode | undefined;
3453
+ priority?: RequestPriority | undefined;
3454
+ redirect?: RequestRedirect | undefined;
3455
+ referrer?: string | undefined;
3456
+ referrerPolicy?: ReferrerPolicy | undefined;
3457
+ signal?: (AbortSignal | null) | undefined;
3458
+ window?: null | undefined;
3459
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3460
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3461
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3462
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3463
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3464
+ hookOptions?: {
3465
+ cloneResponse?: boolean;
3466
+ } | undefined;
3467
+ timeout?: number | undefined;
3468
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3469
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3470
+ baseURL?: string | undefined;
3471
+ throw?: boolean | undefined;
3472
+ auth?: ({
3473
+ type: "Bearer";
3474
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3475
+ } | {
3476
+ type: "Basic";
3477
+ username: string | (() => string | undefined) | undefined;
3478
+ password: string | (() => string | undefined) | undefined;
3479
+ } | {
3480
+ type: "Custom";
3481
+ prefix: string | (() => string | undefined) | undefined;
3482
+ value: string | (() => string | undefined) | undefined;
3483
+ }) | undefined;
3484
+ body?: (Partial<{
3485
+ token: string;
3486
+ }> & Record<string, any>) | undefined;
3487
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3488
+ params?: Record<string, any> | undefined;
3489
+ duplex?: "full" | "half" | undefined;
3490
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3491
+ retry?: better_auth_react.RetryOptions | undefined;
3492
+ retryAttempt?: number | undefined;
3493
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3494
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3495
+ disableValidation?: boolean | undefined;
3496
+ }>(data_0: better_auth.Prettify<{
3497
+ token: string;
3498
+ } & {
3499
+ fetchOptions?: FetchOptions | undefined;
3500
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3501
+ status: boolean;
3502
+ }, {
3503
+ code?: string;
3504
+ message?: string;
3505
+ }, FetchOptions["throw"] extends true ? true : false>>;
3506
+ } & {
3507
+ revokeSessions: <FetchOptions extends {
3508
+ credentials?: RequestCredentials | undefined;
3509
+ method?: string | undefined;
3510
+ headers?: (HeadersInit & (HeadersInit | {
3511
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3512
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3513
+ authorization: "Bearer" | "Basic";
3514
+ })) | undefined;
3515
+ cache?: RequestCache | undefined;
3516
+ integrity?: string | undefined;
3517
+ keepalive?: boolean | undefined;
3518
+ mode?: RequestMode | undefined;
3519
+ priority?: RequestPriority | undefined;
3520
+ redirect?: RequestRedirect | undefined;
3521
+ referrer?: string | undefined;
3522
+ referrerPolicy?: ReferrerPolicy | undefined;
3523
+ signal?: (AbortSignal | null) | undefined;
3524
+ window?: null | undefined;
3525
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3526
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3527
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3528
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3529
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3530
+ hookOptions?: {
3531
+ cloneResponse?: boolean;
3532
+ } | undefined;
3533
+ timeout?: number | undefined;
3534
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3535
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3536
+ baseURL?: string | undefined;
3537
+ throw?: boolean | undefined;
3538
+ auth?: ({
3539
+ type: "Bearer";
3540
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3541
+ } | {
3542
+ type: "Basic";
3543
+ username: string | (() => string | undefined) | undefined;
3544
+ password: string | (() => string | undefined) | undefined;
3545
+ } | {
3546
+ type: "Custom";
3547
+ prefix: string | (() => string | undefined) | undefined;
3548
+ value: string | (() => string | undefined) | undefined;
3549
+ }) | undefined;
3550
+ body?: undefined;
3551
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3552
+ params?: Record<string, any> | undefined;
3553
+ duplex?: "full" | "half" | undefined;
3554
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3555
+ retry?: better_auth_react.RetryOptions | undefined;
3556
+ retryAttempt?: number | undefined;
3557
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3558
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3559
+ disableValidation?: boolean | undefined;
3560
+ }>(data_0?: better_auth.Prettify<{
3561
+ query?: Record<string, any> | undefined;
3562
+ fetchOptions?: FetchOptions | undefined;
3563
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3564
+ status: boolean;
3565
+ }, {
3566
+ code?: string;
3567
+ message?: string;
3568
+ }, FetchOptions["throw"] extends true ? true : false>>;
3569
+ } & {
3570
+ revokeOtherSessions: <FetchOptions extends {
3571
+ credentials?: RequestCredentials | undefined;
3572
+ method?: string | undefined;
3573
+ headers?: (HeadersInit & (HeadersInit | {
3574
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3575
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3576
+ authorization: "Bearer" | "Basic";
3577
+ })) | undefined;
3578
+ cache?: RequestCache | undefined;
3579
+ integrity?: string | undefined;
3580
+ keepalive?: boolean | undefined;
3581
+ mode?: RequestMode | undefined;
3582
+ priority?: RequestPriority | undefined;
3583
+ redirect?: RequestRedirect | undefined;
3584
+ referrer?: string | undefined;
3585
+ referrerPolicy?: ReferrerPolicy | undefined;
3586
+ signal?: (AbortSignal | null) | undefined;
3587
+ window?: null | undefined;
3588
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3589
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3590
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3591
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3592
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3593
+ hookOptions?: {
3594
+ cloneResponse?: boolean;
3595
+ } | undefined;
3596
+ timeout?: number | undefined;
3597
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3598
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3599
+ baseURL?: string | undefined;
3600
+ throw?: boolean | undefined;
3601
+ auth?: ({
3602
+ type: "Bearer";
3603
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3604
+ } | {
3605
+ type: "Basic";
3606
+ username: string | (() => string | undefined) | undefined;
3607
+ password: string | (() => string | undefined) | undefined;
3608
+ } | {
3609
+ type: "Custom";
3610
+ prefix: string | (() => string | undefined) | undefined;
3611
+ value: string | (() => string | undefined) | undefined;
3612
+ }) | undefined;
3613
+ body?: undefined;
3614
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3615
+ params?: Record<string, any> | undefined;
3616
+ duplex?: "full" | "half" | undefined;
3617
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3618
+ retry?: better_auth_react.RetryOptions | undefined;
3619
+ retryAttempt?: number | undefined;
3620
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3621
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3622
+ disableValidation?: boolean | undefined;
3623
+ }>(data_0?: better_auth.Prettify<{
3624
+ query?: Record<string, any> | undefined;
3625
+ fetchOptions?: FetchOptions | undefined;
3626
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3627
+ status: boolean;
3628
+ }, {
3629
+ code?: string;
3630
+ message?: string;
3631
+ }, FetchOptions["throw"] extends true ? true : false>>;
3632
+ } & {
3633
+ linkSocial: <FetchOptions extends {
3634
+ credentials?: RequestCredentials | undefined;
3635
+ method?: string | undefined;
3636
+ headers?: (HeadersInit & (HeadersInit | {
3637
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3638
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3639
+ authorization: "Bearer" | "Basic";
3640
+ })) | undefined;
3641
+ cache?: RequestCache | undefined;
3642
+ integrity?: string | undefined;
3643
+ keepalive?: boolean | undefined;
3644
+ mode?: RequestMode | undefined;
3645
+ priority?: RequestPriority | undefined;
3646
+ redirect?: RequestRedirect | undefined;
3647
+ referrer?: string | undefined;
3648
+ referrerPolicy?: ReferrerPolicy | undefined;
3649
+ signal?: (AbortSignal | null) | undefined;
3650
+ window?: null | undefined;
3651
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3652
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3653
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3654
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3655
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3656
+ hookOptions?: {
3657
+ cloneResponse?: boolean;
3658
+ } | undefined;
3659
+ timeout?: number | undefined;
3660
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3661
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3662
+ baseURL?: string | undefined;
3663
+ throw?: boolean | undefined;
3664
+ auth?: ({
3665
+ type: "Bearer";
3666
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3667
+ } | {
3668
+ type: "Basic";
3669
+ username: string | (() => string | undefined) | undefined;
3670
+ password: string | (() => string | undefined) | undefined;
3671
+ } | {
3672
+ type: "Custom";
3673
+ prefix: string | (() => string | undefined) | undefined;
3674
+ value: string | (() => string | undefined) | undefined;
3675
+ }) | undefined;
3676
+ body?: (Partial<{
3677
+ provider: unknown;
3678
+ callbackURL?: string | undefined;
3679
+ idToken?: {
3680
+ token: string;
3681
+ nonce?: string | undefined;
3682
+ accessToken?: string | undefined;
3683
+ refreshToken?: string | undefined;
3684
+ scopes?: string[] | undefined;
3685
+ } | undefined;
3686
+ requestSignUp?: boolean | undefined;
3687
+ scopes?: string[] | undefined;
3688
+ errorCallbackURL?: string | undefined;
3689
+ disableRedirect?: boolean | undefined;
3690
+ }> & Record<string, any>) | undefined;
3691
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3692
+ params?: Record<string, any> | undefined;
3693
+ duplex?: "full" | "half" | undefined;
3694
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3695
+ retry?: better_auth_react.RetryOptions | undefined;
3696
+ retryAttempt?: number | undefined;
3697
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3698
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3699
+ disableValidation?: boolean | undefined;
3700
+ }>(data_0: better_auth.Prettify<{
3701
+ provider: unknown;
3702
+ callbackURL?: string | undefined;
3703
+ idToken?: {
3704
+ token: string;
3705
+ nonce?: string | undefined;
3706
+ accessToken?: string | undefined;
3707
+ refreshToken?: string | undefined;
3708
+ scopes?: string[] | undefined;
3709
+ } | undefined;
3710
+ requestSignUp?: boolean | undefined;
3711
+ scopes?: string[] | undefined;
3712
+ errorCallbackURL?: string | undefined;
3713
+ disableRedirect?: boolean | undefined;
3714
+ } & {
3715
+ fetchOptions?: FetchOptions | undefined;
3716
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3717
+ url: string;
3718
+ redirect: boolean;
3719
+ }, {
3720
+ code?: string;
3721
+ message?: string;
3722
+ }, FetchOptions["throw"] extends true ? true : false>>;
3723
+ } & {
3724
+ listAccounts: <FetchOptions extends {
3725
+ credentials?: RequestCredentials | undefined;
3726
+ method?: string | undefined;
3727
+ headers?: (HeadersInit & (HeadersInit | {
3728
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3729
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3730
+ authorization: "Bearer" | "Basic";
3731
+ })) | undefined;
3732
+ cache?: RequestCache | undefined;
3733
+ integrity?: string | undefined;
3734
+ keepalive?: boolean | undefined;
3735
+ mode?: RequestMode | undefined;
3736
+ priority?: RequestPriority | undefined;
3737
+ redirect?: RequestRedirect | undefined;
3738
+ referrer?: string | undefined;
3739
+ referrerPolicy?: ReferrerPolicy | undefined;
3740
+ signal?: (AbortSignal | null) | undefined;
3741
+ window?: null | undefined;
3742
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3743
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3744
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3745
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3746
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3747
+ hookOptions?: {
3748
+ cloneResponse?: boolean;
3749
+ } | undefined;
3750
+ timeout?: number | undefined;
3751
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3752
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3753
+ baseURL?: string | undefined;
3754
+ throw?: boolean | undefined;
3755
+ auth?: ({
3756
+ type: "Bearer";
3757
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3758
+ } | {
3759
+ type: "Basic";
3760
+ username: string | (() => string | undefined) | undefined;
3761
+ password: string | (() => string | undefined) | undefined;
3762
+ } | {
3763
+ type: "Custom";
3764
+ prefix: string | (() => string | undefined) | undefined;
3765
+ value: string | (() => string | undefined) | undefined;
3766
+ }) | undefined;
3767
+ body?: undefined;
3768
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3769
+ params?: Record<string, any> | undefined;
3770
+ duplex?: "full" | "half" | undefined;
3771
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3772
+ retry?: better_auth_react.RetryOptions | undefined;
3773
+ retryAttempt?: number | undefined;
3774
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3775
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3776
+ disableValidation?: boolean | undefined;
3777
+ }>(data_0?: better_auth.Prettify<{
3778
+ query?: Record<string, any> | undefined;
3779
+ fetchOptions?: FetchOptions | undefined;
3780
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3781
+ id: string;
3782
+ providerId: string;
3783
+ createdAt: Date;
3784
+ updatedAt: Date;
3785
+ accountId: string;
3786
+ scopes: string[];
3787
+ }[], {
3788
+ code?: string;
3789
+ message?: string;
3790
+ }, FetchOptions["throw"] extends true ? true : false>>;
3791
+ } & {
3792
+ deleteUser: {
3793
+ callback: <FetchOptions extends {
3794
+ credentials?: RequestCredentials | undefined;
3795
+ method?: string | undefined;
3796
+ headers?: (HeadersInit & (HeadersInit | {
3797
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3798
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3799
+ authorization: "Bearer" | "Basic";
3800
+ })) | undefined;
3801
+ cache?: RequestCache | undefined;
3802
+ integrity?: string | undefined;
3803
+ keepalive?: boolean | undefined;
3804
+ mode?: RequestMode | undefined;
3805
+ priority?: RequestPriority | undefined;
3806
+ redirect?: RequestRedirect | undefined;
3807
+ referrer?: string | undefined;
3808
+ referrerPolicy?: ReferrerPolicy | undefined;
3809
+ signal?: (AbortSignal | null) | undefined;
3810
+ window?: null | undefined;
3811
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3812
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3813
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3814
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3815
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3816
+ hookOptions?: {
3817
+ cloneResponse?: boolean;
3818
+ } | undefined;
3819
+ timeout?: number | undefined;
3820
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3821
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3822
+ baseURL?: string | undefined;
3823
+ throw?: boolean | undefined;
3824
+ auth?: ({
3825
+ type: "Bearer";
3826
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3827
+ } | {
3828
+ type: "Basic";
3829
+ username: string | (() => string | undefined) | undefined;
3830
+ password: string | (() => string | undefined) | undefined;
3831
+ } | {
3832
+ type: "Custom";
3833
+ prefix: string | (() => string | undefined) | undefined;
3834
+ value: string | (() => string | undefined) | undefined;
3835
+ }) | undefined;
3836
+ body?: undefined;
3837
+ query?: (Partial<{
3838
+ token: string;
3839
+ callbackURL?: string | undefined;
3840
+ }> & Record<string, any>) | undefined;
3841
+ params?: Record<string, any> | undefined;
3842
+ duplex?: "full" | "half" | undefined;
3843
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3844
+ retry?: better_auth_react.RetryOptions | undefined;
3845
+ retryAttempt?: number | undefined;
3846
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3847
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3848
+ disableValidation?: boolean | undefined;
3849
+ }>(data_0: better_auth.Prettify<{
3850
+ query: {
3851
+ token: string;
3852
+ callbackURL?: string | undefined;
3853
+ };
3854
+ fetchOptions?: FetchOptions | undefined;
3855
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3856
+ success: boolean;
3857
+ message: string;
3858
+ }, {
3859
+ code?: string;
3860
+ message?: string;
3861
+ }, FetchOptions["throw"] extends true ? true : false>>;
3862
+ };
3863
+ } & {
3864
+ unlinkAccount: <FetchOptions extends {
3865
+ credentials?: RequestCredentials | undefined;
3866
+ method?: string | undefined;
3867
+ headers?: (HeadersInit & (HeadersInit | {
3868
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3869
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3870
+ authorization: "Bearer" | "Basic";
3871
+ })) | undefined;
3872
+ cache?: RequestCache | undefined;
3873
+ integrity?: string | undefined;
3874
+ keepalive?: boolean | undefined;
3875
+ mode?: RequestMode | undefined;
3876
+ priority?: RequestPriority | undefined;
3877
+ redirect?: RequestRedirect | undefined;
3878
+ referrer?: string | undefined;
3879
+ referrerPolicy?: ReferrerPolicy | undefined;
3880
+ signal?: (AbortSignal | null) | undefined;
3881
+ window?: null | undefined;
3882
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3883
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3884
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3885
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3886
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3887
+ hookOptions?: {
3888
+ cloneResponse?: boolean;
3889
+ } | undefined;
3890
+ timeout?: number | undefined;
3891
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3892
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3893
+ baseURL?: string | undefined;
3894
+ throw?: boolean | undefined;
3895
+ auth?: ({
3896
+ type: "Bearer";
3897
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3898
+ } | {
3899
+ type: "Basic";
3900
+ username: string | (() => string | undefined) | undefined;
3901
+ password: string | (() => string | undefined) | undefined;
3902
+ } | {
3903
+ type: "Custom";
3904
+ prefix: string | (() => string | undefined) | undefined;
3905
+ value: string | (() => string | undefined) | undefined;
3906
+ }) | undefined;
3907
+ body?: (Partial<{
3908
+ providerId: string;
3909
+ accountId?: string | undefined;
3910
+ }> & Record<string, any>) | undefined;
3911
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3912
+ params?: Record<string, any> | undefined;
3913
+ duplex?: "full" | "half" | undefined;
3914
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3915
+ retry?: better_auth_react.RetryOptions | undefined;
3916
+ retryAttempt?: number | undefined;
3917
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3918
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3919
+ disableValidation?: boolean | undefined;
3920
+ }>(data_0: better_auth.Prettify<{
3921
+ providerId: string;
3922
+ accountId?: string | undefined;
3923
+ } & {
3924
+ fetchOptions?: FetchOptions | undefined;
3925
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
3926
+ status: boolean;
3927
+ }, {
3928
+ code?: string;
3929
+ message?: string;
3930
+ }, FetchOptions["throw"] extends true ? true : false>>;
3931
+ } & {
3932
+ refreshToken: <FetchOptions extends {
3933
+ credentials?: RequestCredentials | undefined;
3934
+ method?: string | undefined;
3935
+ headers?: (HeadersInit & (HeadersInit | {
3936
+ accept: "application/json" | "text/plain" | "application/octet-stream";
3937
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
3938
+ authorization: "Bearer" | "Basic";
3939
+ })) | undefined;
3940
+ cache?: RequestCache | undefined;
3941
+ integrity?: string | undefined;
3942
+ keepalive?: boolean | undefined;
3943
+ mode?: RequestMode | undefined;
3944
+ priority?: RequestPriority | undefined;
3945
+ redirect?: RequestRedirect | undefined;
3946
+ referrer?: string | undefined;
3947
+ referrerPolicy?: ReferrerPolicy | undefined;
3948
+ signal?: (AbortSignal | null) | undefined;
3949
+ window?: null | undefined;
3950
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
3951
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
3952
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
3953
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
3954
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
3955
+ hookOptions?: {
3956
+ cloneResponse?: boolean;
3957
+ } | undefined;
3958
+ timeout?: number | undefined;
3959
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
3960
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
3961
+ baseURL?: string | undefined;
3962
+ throw?: boolean | undefined;
3963
+ auth?: ({
3964
+ type: "Bearer";
3965
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
3966
+ } | {
3967
+ type: "Basic";
3968
+ username: string | (() => string | undefined) | undefined;
3969
+ password: string | (() => string | undefined) | undefined;
3970
+ } | {
3971
+ type: "Custom";
3972
+ prefix: string | (() => string | undefined) | undefined;
3973
+ value: string | (() => string | undefined) | undefined;
3974
+ }) | undefined;
3975
+ body?: (Partial<{
3976
+ providerId: string;
3977
+ accountId?: string | undefined;
3978
+ userId?: string | undefined;
3979
+ }> & Record<string, any>) | undefined;
3980
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
3981
+ params?: Record<string, any> | undefined;
3982
+ duplex?: "full" | "half" | undefined;
3983
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
3984
+ retry?: better_auth_react.RetryOptions | undefined;
3985
+ retryAttempt?: number | undefined;
3986
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
3987
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
3988
+ disableValidation?: boolean | undefined;
3989
+ }>(data_0: better_auth.Prettify<{
3990
+ providerId: string;
3991
+ accountId?: string | undefined;
3992
+ userId?: string | undefined;
3993
+ } & {
3994
+ fetchOptions?: FetchOptions | undefined;
3995
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<any, {
3996
+ code?: string;
3997
+ message?: string;
3998
+ }, FetchOptions["throw"] extends true ? true : false>>;
3999
+ } & {
4000
+ getAccessToken: <FetchOptions extends {
4001
+ credentials?: RequestCredentials | undefined;
4002
+ method?: string | undefined;
4003
+ headers?: (HeadersInit & (HeadersInit | {
4004
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4005
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4006
+ authorization: "Bearer" | "Basic";
4007
+ })) | undefined;
4008
+ cache?: RequestCache | undefined;
4009
+ integrity?: string | undefined;
4010
+ keepalive?: boolean | undefined;
4011
+ mode?: RequestMode | undefined;
4012
+ priority?: RequestPriority | undefined;
4013
+ redirect?: RequestRedirect | undefined;
4014
+ referrer?: string | undefined;
4015
+ referrerPolicy?: ReferrerPolicy | undefined;
4016
+ signal?: (AbortSignal | null) | undefined;
4017
+ window?: null | undefined;
4018
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4019
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4020
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4021
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4022
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4023
+ hookOptions?: {
4024
+ cloneResponse?: boolean;
4025
+ } | undefined;
4026
+ timeout?: number | undefined;
4027
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
4028
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4029
+ baseURL?: string | undefined;
4030
+ throw?: boolean | undefined;
4031
+ auth?: ({
4032
+ type: "Bearer";
4033
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4034
+ } | {
4035
+ type: "Basic";
4036
+ username: string | (() => string | undefined) | undefined;
4037
+ password: string | (() => string | undefined) | undefined;
4038
+ } | {
4039
+ type: "Custom";
4040
+ prefix: string | (() => string | undefined) | undefined;
4041
+ value: string | (() => string | undefined) | undefined;
4042
+ }) | undefined;
4043
+ body?: (Partial<{
4044
+ providerId: string;
4045
+ accountId?: string | undefined;
4046
+ userId?: string | 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
+ providerId: string;
4059
+ accountId?: string | undefined;
4060
+ userId?: string | undefined;
4061
+ } & {
4062
+ fetchOptions?: FetchOptions | undefined;
4063
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4064
+ accessToken: string;
4065
+ accessTokenExpiresAt: Date | undefined;
4066
+ scopes: string[];
4067
+ idToken: string | undefined;
4068
+ }, {
4069
+ code?: string;
4070
+ message?: string;
4071
+ }, FetchOptions["throw"] extends true ? true : false>>;
4072
+ } & {
4073
+ accountInfo: <FetchOptions extends {
4074
+ credentials?: RequestCredentials | undefined;
4075
+ method?: string | undefined;
4076
+ headers?: (HeadersInit & (HeadersInit | {
4077
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4078
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4079
+ authorization: "Bearer" | "Basic";
4080
+ })) | undefined;
4081
+ cache?: RequestCache | undefined;
4082
+ integrity?: string | undefined;
4083
+ keepalive?: boolean | undefined;
4084
+ mode?: RequestMode | undefined;
4085
+ priority?: RequestPriority | undefined;
4086
+ redirect?: RequestRedirect | undefined;
4087
+ referrer?: string | undefined;
4088
+ referrerPolicy?: ReferrerPolicy | undefined;
4089
+ signal?: (AbortSignal | null) | undefined;
4090
+ window?: null | undefined;
4091
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4092
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4093
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4094
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4095
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4096
+ hookOptions?: {
4097
+ cloneResponse?: boolean;
4098
+ } | undefined;
4099
+ timeout?: number | undefined;
4100
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
4101
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4102
+ baseURL?: string | undefined;
4103
+ throw?: boolean | undefined;
4104
+ auth?: ({
4105
+ type: "Bearer";
4106
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4107
+ } | {
4108
+ type: "Basic";
4109
+ username: string | (() => string | undefined) | undefined;
4110
+ password: string | (() => string | undefined) | undefined;
4111
+ } | {
4112
+ type: "Custom";
4113
+ prefix: string | (() => string | undefined) | undefined;
4114
+ value: string | (() => string | undefined) | undefined;
4115
+ }) | undefined;
4116
+ body?: (Partial<{
4117
+ accountId: string;
4118
+ }> & Record<string, any>) | undefined;
4119
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
4120
+ params?: Record<string, any> | undefined;
4121
+ duplex?: "full" | "half" | undefined;
4122
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4123
+ retry?: better_auth_react.RetryOptions | undefined;
4124
+ retryAttempt?: number | undefined;
4125
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4126
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4127
+ disableValidation?: boolean | undefined;
4128
+ }>(data_0: better_auth.Prettify<{
4129
+ accountId: string;
4130
+ } & {
4131
+ fetchOptions?: FetchOptions | undefined;
4132
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4133
+ user: packages_core_dist_oauth2.OAuth2UserInfo;
4134
+ data: Record<string, any>;
4135
+ }, {
4136
+ code?: string;
4137
+ message?: string;
4138
+ }, FetchOptions["throw"] extends true ? true : false>>;
4139
+ } & {
4140
+ getSession: <FetchOptions extends {
4141
+ credentials?: RequestCredentials | undefined;
4142
+ method?: string | undefined;
4143
+ headers?: (HeadersInit & (HeadersInit | {
4144
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4145
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4146
+ authorization: "Bearer" | "Basic";
4147
+ })) | undefined;
4148
+ cache?: RequestCache | undefined;
4149
+ integrity?: string | undefined;
4150
+ keepalive?: boolean | undefined;
4151
+ mode?: RequestMode | undefined;
4152
+ priority?: RequestPriority | undefined;
4153
+ redirect?: RequestRedirect | undefined;
4154
+ referrer?: string | undefined;
4155
+ referrerPolicy?: ReferrerPolicy | undefined;
4156
+ signal?: (AbortSignal | null) | undefined;
4157
+ window?: null | undefined;
4158
+ onRequest?: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4159
+ onResponse?: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4160
+ onSuccess?: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4161
+ onError?: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4162
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4163
+ hookOptions?: {
4164
+ cloneResponse?: boolean;
4165
+ } | undefined;
4166
+ timeout?: number | undefined;
4167
+ customFetchImpl?: better_auth_react.FetchEsque | undefined;
4168
+ plugins?: better_auth_react.BetterFetchPlugin[] | undefined;
4169
+ baseURL?: string | undefined;
4170
+ throw?: boolean | undefined;
4171
+ auth?: ({
4172
+ type: "Bearer";
4173
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4174
+ } | {
4175
+ type: "Basic";
4176
+ username: string | (() => string | undefined) | undefined;
4177
+ password: string | (() => string | undefined) | undefined;
4178
+ } | {
4179
+ type: "Custom";
4180
+ prefix: string | (() => string | undefined) | undefined;
4181
+ value: string | (() => string | undefined) | undefined;
4182
+ }) | undefined;
4183
+ body?: undefined;
4184
+ query?: (Partial<{
4185
+ disableCookieCache?: unknown;
4186
+ disableRefresh?: unknown;
4187
+ }> & Record<string, any>) | undefined;
4188
+ params?: Record<string, any> | undefined;
4189
+ duplex?: "full" | "half" | undefined;
4190
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
4191
+ retry?: better_auth_react.RetryOptions | undefined;
4192
+ retryAttempt?: number | undefined;
4193
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4194
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4195
+ disableValidation?: boolean | undefined;
4196
+ }>(data_0?: better_auth.Prettify<{
4197
+ query?: {
4198
+ disableCookieCache?: unknown;
4199
+ disableRefresh?: unknown;
4200
+ } | undefined;
4201
+ fetchOptions?: FetchOptions | undefined;
4202
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react.BetterFetchResponse<{
4203
+ user: {
4204
+ id: string;
4205
+ createdAt: Date;
4206
+ updatedAt: Date;
4207
+ email: string;
4208
+ emailVerified: boolean;
4209
+ name: string;
4210
+ image?: string | null | undefined;
4211
+ };
4212
+ session: {
4213
+ id: string;
4214
+ createdAt: Date;
4215
+ updatedAt: Date;
4216
+ userId: string;
4217
+ expiresAt: Date;
4218
+ token: string;
4219
+ ipAddress?: string | null | undefined;
4220
+ userAgent?: string | null | undefined;
4221
+ };
4222
+ } | null, {
4223
+ code?: string;
4224
+ message?: string;
4225
+ }, FetchOptions["throw"] extends true ? true : false>>;
4226
+ } & {
4227
+ useSession: () => {
4228
+ data: {
4229
+ user: {
4230
+ id: string;
4231
+ createdAt: Date;
4232
+ updatedAt: Date;
4233
+ email: string;
4234
+ emailVerified: boolean;
4235
+ name: string;
4236
+ image?: string | null | undefined;
4237
+ };
4238
+ session: {
4239
+ id: string;
4240
+ createdAt: Date;
4241
+ updatedAt: Date;
4242
+ userId: string;
4243
+ expiresAt: Date;
4244
+ token: string;
4245
+ ipAddress?: string | null | undefined;
4246
+ userAgent?: string | null | undefined;
4247
+ };
4248
+ } | null;
4249
+ isPending: boolean;
4250
+ isRefetching: boolean;
4251
+ error: better_auth_react.BetterFetchError | null;
4252
+ refetch: (queryParams?: {
4253
+ query?: better_auth.SessionQueryParams;
4254
+ }) => void;
4255
+ };
4256
+ $Infer: {
4257
+ Session: {
4258
+ user: {
4259
+ id: string;
4260
+ createdAt: Date;
4261
+ updatedAt: Date;
4262
+ email: string;
4263
+ emailVerified: boolean;
4264
+ name: string;
4265
+ image?: string | null | undefined;
4266
+ };
4267
+ session: {
4268
+ id: string;
4269
+ createdAt: Date;
4270
+ updatedAt: Date;
4271
+ userId: string;
4272
+ expiresAt: Date;
4273
+ token: string;
4274
+ ipAddress?: string | null | undefined;
4275
+ userAgent?: string | null | undefined;
4276
+ };
4277
+ };
4278
+ };
4279
+ $fetch: better_auth_react.BetterFetch<{
4280
+ plugins: (better_auth_react.BetterFetchPlugin | {
4281
+ id: string;
4282
+ name: string;
4283
+ hooks: {
4284
+ onSuccess: ((context: better_auth_react.SuccessContext<any>) => Promise<void> | void) | undefined;
4285
+ onError: ((context: better_auth_react.ErrorContext) => Promise<void> | void) | undefined;
4286
+ onRequest: (<T extends Record<string, any>>(context: better_auth_react.RequestContext<T>) => Promise<better_auth_react.RequestContext | void> | better_auth_react.RequestContext | void) | undefined;
4287
+ onResponse: ((context: better_auth_react.ResponseContext) => Promise<Response | void | better_auth_react.ResponseContext> | Response | better_auth_react.ResponseContext | void) | undefined;
4288
+ };
4289
+ } | {
4290
+ id: string;
4291
+ name: string;
4292
+ hooks: {
4293
+ onSuccess(context: better_auth_react.SuccessContext<any>): void;
4294
+ };
4295
+ })[];
4296
+ method: string;
4297
+ headers?: (HeadersInit & (HeadersInit | {
4298
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4299
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4300
+ authorization: "Bearer" | "Basic";
4301
+ })) | undefined;
4302
+ redirect?: RequestRedirect | undefined;
4303
+ cache?: RequestCache | undefined;
4304
+ credentials?: RequestCredentials;
4305
+ integrity?: string | undefined;
4306
+ keepalive?: boolean | undefined;
4307
+ mode?: RequestMode | undefined;
4308
+ priority?: RequestPriority | undefined;
4309
+ referrer?: string | undefined;
4310
+ referrerPolicy?: ReferrerPolicy | undefined;
4311
+ signal?: (AbortSignal | null) | undefined;
4312
+ window?: null | undefined;
4313
+ onRetry?: ((response: better_auth_react.ResponseContext) => Promise<void> | void) | undefined;
4314
+ hookOptions?: {
4315
+ cloneResponse?: boolean;
4316
+ } | undefined;
4317
+ timeout?: number | undefined;
4318
+ customFetchImpl: better_auth_react.FetchEsque;
4319
+ baseURL: string;
4320
+ throw?: boolean | undefined;
4321
+ auth?: ({
4322
+ type: "Bearer";
4323
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4324
+ } | {
4325
+ type: "Basic";
4326
+ username: string | (() => string | undefined) | undefined;
4327
+ password: string | (() => string | undefined) | undefined;
4328
+ } | {
4329
+ type: "Custom";
4330
+ prefix: string | (() => string | undefined) | undefined;
4331
+ value: string | (() => string | undefined) | undefined;
4332
+ }) | undefined;
4333
+ body?: any;
4334
+ query?: any;
4335
+ params?: any;
4336
+ duplex?: "full" | "half" | undefined;
4337
+ jsonParser: (text: string) => Promise<any> | any;
4338
+ retry?: better_auth_react.RetryOptions | undefined;
4339
+ retryAttempt?: number | undefined;
4340
+ output?: (better_auth_react.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
4341
+ errorSchema?: better_auth_react.StandardSchemaV1 | undefined;
4342
+ disableValidation?: boolean | undefined;
4343
+ }, unknown, unknown, {}>;
4344
+ $store: {
4345
+ notify: (signal?: Omit<string, "$sessionSignal"> | "$sessionSignal") => void;
4346
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
4347
+ atoms: Record<string, better_auth_react.WritableAtom<any>>;
4348
+ };
4349
+ $ERROR_CODES: {
4350
+ readonly USER_NOT_FOUND: "User not found";
4351
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
4352
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
4353
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
4354
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
4355
+ readonly INVALID_PASSWORD: "Invalid password";
4356
+ readonly INVALID_EMAIL: "Invalid email";
4357
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
4358
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
4359
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
4360
+ readonly INVALID_TOKEN: "Invalid token";
4361
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
4362
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
4363
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
4364
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
4365
+ readonly PASSWORD_TOO_SHORT: "Password too short";
4366
+ readonly PASSWORD_TOO_LONG: "Password too long";
4367
+ readonly USER_ALREADY_EXISTS: "User already exists.";
4368
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
4369
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
4370
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
4371
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
4372
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
4373
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
4374
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
4375
+ };
4376
+ };
4377
+ /**
4378
+ * Type helper for inferring the auth client type
4379
+ */
4380
+ type AuthClient = ReturnType<typeof createAuthClient>;
4381
+
4382
+ /**
4383
+ * @erikey/react - KV Store Client
4384
+ *
4385
+ * Erikey-specific key-value storage for end-users.
4386
+ * Stores data per-user, scoped to the project.
4387
+ *
4388
+ * This is NOT part of better-auth - it's an Erikey-specific feature.
4389
+ */
4390
+ interface KvClientConfig {
4391
+ /**
4392
+ * Your Erikey project ID (pk_live_xxx or pk_test_xxx)
4393
+ */
4394
+ projectId: string;
4395
+ /**
4396
+ * Base URL for the auth API
4397
+ * @default 'https://auth.erikey.com'
4398
+ */
4399
+ baseUrl?: string;
4400
+ }
4401
+ interface KvPair {
4402
+ key: string;
4403
+ value: any;
4404
+ createdAt: string;
4405
+ updatedAt: string;
4406
+ }
4407
+ interface KvBulkSetInput {
4408
+ key: string;
4409
+ value: any;
4410
+ }
4411
+ interface SetValueResponse {
4412
+ success: boolean;
4413
+ data?: {
4414
+ key: string;
4415
+ value: any;
4416
+ };
4417
+ error?: string;
4418
+ }
4419
+ interface GetValueResponse {
4420
+ success: boolean;
4421
+ data?: KvPair;
4422
+ error?: string;
4423
+ }
4424
+ interface GetValuesResponse {
4425
+ success: boolean;
4426
+ data?: {
4427
+ kvPairs: KvPair[];
4428
+ total: number;
4429
+ };
4430
+ error?: string;
4431
+ }
4432
+ interface DeleteValueResponse {
4433
+ success: boolean;
4434
+ data?: {
4435
+ message: string;
4436
+ };
4437
+ error?: string;
4438
+ }
4439
+ interface DeleteValuesResponse {
4440
+ success: boolean;
4441
+ data?: {
4442
+ deleted: string[];
4443
+ failed: Array<{
4444
+ key: string;
4445
+ error: string;
4446
+ }>;
4447
+ };
4448
+ error?: string;
4449
+ }
4450
+ interface SetValuesResponse {
4451
+ success: boolean;
4452
+ data?: {
4453
+ results: Array<{
4454
+ key: string;
4455
+ success: boolean;
4456
+ }>;
4457
+ total: number;
4458
+ };
4459
+ error?: string;
4460
+ }
4461
+ /**
4462
+ * Create a KV store client for per-user data storage
4463
+ *
4464
+ * @example
4465
+ * ```tsx
4466
+ * import { createKvClient } from '@erikey/react';
4467
+ *
4468
+ * const kv = createKvClient({
4469
+ * projectId: 'pk_live_xxx',
4470
+ * });
4471
+ *
4472
+ * // Store a value
4473
+ * await kv.setValue('preferences', { theme: 'dark' });
4474
+ *
4475
+ * // Get a value
4476
+ * const { data } = await kv.getValue('preferences');
4477
+ *
4478
+ * // Get all values
4479
+ * const { data: all } = await kv.getValues();
4480
+ *
4481
+ * // Delete a value
4482
+ * await kv.deleteValue('preferences');
4483
+ * ```
4484
+ */
4485
+ declare function createKvClient(config: KvClientConfig): {
4486
+ /**
4487
+ * Set a single key-value pair
4488
+ */
4489
+ setValue: (key: string, value: any) => Promise<SetValueResponse>;
4490
+ /**
4491
+ * Get a single key-value pair
4492
+ */
4493
+ getValue: (key: string) => Promise<GetValueResponse>;
4494
+ /**
4495
+ * Get all key-value pairs for the authenticated user
4496
+ */
4497
+ getValues: () => Promise<GetValuesResponse>;
4498
+ /**
4499
+ * Delete a single key-value pair
4500
+ */
4501
+ deleteValue: (key: string) => Promise<DeleteValueResponse>;
4502
+ /**
4503
+ * Delete multiple key-value pairs
4504
+ */
4505
+ deleteValues: (keys: string[]) => Promise<DeleteValuesResponse>;
4506
+ /**
4507
+ * Set multiple key-value pairs in bulk (max 100 pairs)
4508
+ */
4509
+ setValues: (kvPairs: KvBulkSetInput[]) => Promise<SetValuesResponse>;
4510
+ };
4511
+ /**
4512
+ * Type helper for inferring the KV client type
4513
+ */
4514
+ type KvClient = ReturnType<typeof createKvClient>;
2214
4515
 
2215
- export { type AuthClient, type DashboardClient, type DashboardClientConfig, createAuthClient, createDashboardClient };
4516
+ 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 };