appos 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (156) hide show
  1. package/README.md +399 -0
  2. package/build/client/assets/IconMail-BZadZvAd.js +1 -0
  3. package/build/client/assets/_-CgPm6_fJ.js +1 -0
  4. package/build/client/assets/_index-BCLDp_mg.js +1 -0
  5. package/build/client/assets/_layout-CTmjtKOZ.js +1 -0
  6. package/build/client/assets/_layout-HsJ3Zu5t.js +1 -0
  7. package/build/client/assets/_layout-OcS85aOt.js +1 -0
  8. package/build/client/assets/app-sidebar-Bm6e4kn_.js +1 -0
  9. package/build/client/assets/app-sidebar-D2Nsi85j.js +1 -0
  10. package/build/client/assets/auth-provider-rkzBVtYX.js +1 -0
  11. package/build/client/assets/brand-CbTWw97e.js +1 -0
  12. package/build/client/assets/browser-ponyfill-D3yQFvRu.js +2 -0
  13. package/build/client/assets/button-DtZhoqpk.js +1 -0
  14. package/build/client/assets/check-D5D2EGI4.js +1 -0
  15. package/build/client/assets/checkbox-B35Nn166.js +1 -0
  16. package/build/client/assets/chunk-JG3XND5A-BetDbdG0.js +1 -0
  17. package/build/client/assets/chunk-UIGDSWPH-DeiamgQc.js +26 -0
  18. package/build/client/assets/chunk-vBKQ29Cd.js +1 -0
  19. package/build/client/assets/circle-alert-DB4JluX5.js +1 -0
  20. package/build/client/assets/compare-Br3z3FUS-BXkA2ojG.js +2 -0
  21. package/build/client/assets/compiler-runtime-Co9svCia.js +1 -0
  22. package/build/client/assets/config-ChcA_Pkv.js +1 -0
  23. package/build/client/assets/createReactComponent-C2TSpqC7.js +1 -0
  24. package/build/client/assets/dialog-CQrpvURm.js +1 -0
  25. package/build/client/assets/dist-B6TkSbxV.js +1 -0
  26. package/build/client/assets/dist-BNO39Rfs.js +1 -0
  27. package/build/client/assets/dist-BWnI-4xl.js +1 -0
  28. package/build/client/assets/dist-CA21wN5I.js +1 -0
  29. package/build/client/assets/dist-CBNvQRbZ.js +1 -0
  30. package/build/client/assets/dist-CYRPrwOb.js +1 -0
  31. package/build/client/assets/dist-DKtC0FSi.js +1 -0
  32. package/build/client/assets/dist-DhfcebhF.js +1 -0
  33. package/build/client/assets/dist-VqaKdvZu.js +1 -0
  34. package/build/client/assets/dist-Yn6lj8QC.js +5 -0
  35. package/build/client/assets/dropdown-menu-CbzduuDa.js +1 -0
  36. package/build/client/assets/empty-DQRarCKT.js +1 -0
  37. package/build/client/assets/entry.client-BN1GPjAL.js +10 -0
  38. package/build/client/assets/es2015-BJguufLZ.js +41 -0
  39. package/build/client/assets/eye-Ctrln70x.js +1 -0
  40. package/build/client/assets/file-preview-dialog-BRkWSRN4.js +14 -0
  41. package/build/client/assets/index-Del2yBnb.js +1 -0
  42. package/build/client/assets/initReactI18next-CyHiepAw.js +1 -0
  43. package/build/client/assets/input-V1lM1yoz.js +1 -0
  44. package/build/client/assets/jsx-runtime-SCjaiuzT.js +1 -0
  45. package/build/client/assets/lock-Bj7dxHab.js +1 -0
  46. package/build/client/assets/manifest-ca813980.js +1 -0
  47. package/build/client/assets/nav-user-BqPUBe9x.js +1 -0
  48. package/build/client/assets/nav-user-Yu7wt7b_.js +1 -0
  49. package/build/client/assets/org-switcher-BIuearbE.js +1 -0
  50. package/build/client/assets/password-input-bor7e4TM.js +1 -0
  51. package/build/client/assets/react-dom-Bhi-1tDD.js +1 -0
  52. package/build/client/assets/realtime-BmU1LPhx.js +1 -0
  53. package/build/client/assets/root-CS5YIV-V.js +3 -0
  54. package/build/client/assets/root-D0CFuQYc.css +2 -0
  55. package/build/client/assets/route-B9cwW-UK.js +1 -0
  56. package/build/client/assets/route-BD2nV1q2.js +1 -0
  57. package/build/client/assets/route-BEnDcljt.js +1 -0
  58. package/build/client/assets/route-BR4LdxHR.js +1 -0
  59. package/build/client/assets/route-BU5TYmVE.js +0 -0
  60. package/build/client/assets/route-BVmIPEvK.js +11 -0
  61. package/build/client/assets/route-BY244T48.js +1 -0
  62. package/build/client/assets/route-Bwd903CU.js +1 -0
  63. package/build/client/assets/route-CN9iChOk.js +1 -0
  64. package/build/client/assets/route-CQ3p9Qb1.js +1 -0
  65. package/build/client/assets/route-CVLnTONw.js +1 -0
  66. package/build/client/assets/route-CoMZag4T.js +1 -0
  67. package/build/client/assets/route-CsYSLbnx.js +1 -0
  68. package/build/client/assets/route-DWNrq2GE.js +1 -0
  69. package/build/client/assets/route-Dxfmap_u.js +1 -0
  70. package/build/client/assets/route-Gnx1fkRX.js +0 -0
  71. package/build/client/assets/route-NduA4SS_.js +1 -0
  72. package/build/client/assets/route-u2hskgE_.js +1 -0
  73. package/build/client/assets/route-v9Jwv-AW.js +1 -0
  74. package/build/client/assets/select-DATRE76_.js +1 -0
  75. package/build/client/assets/separator-Cla0V581.js +1 -0
  76. package/build/client/assets/shim-TRiHENXu.js +1 -0
  77. package/build/client/assets/sidebar-CqrdL512.js +1 -0
  78. package/build/client/assets/site-header-CZO3qBhf.js +1 -0
  79. package/build/client/assets/site-header-CwidwSv1.js +1 -0
  80. package/build/client/assets/social-providers-Bz7f1_yd.js +1 -0
  81. package/build/client/assets/test-WdoqKbLa.js +1 -0
  82. package/build/client/assets/tooltip-BeDraHQn.js +1 -0
  83. package/build/client/assets/trpc-C1CjVipH.js +6 -0
  84. package/build/client/assets/trust-indicator-D4tEs4Dr.js +20 -0
  85. package/build/client/assets/use-file-upload-CNPfWC6W.js +1 -0
  86. package/build/client/assets/useTranslation-Bz7VuQ7j.js +1 -0
  87. package/build/client/assets/utils-InBzhUf_.js +1 -0
  88. package/build/client/assets/x-4CC8aqOW.js +1 -0
  89. package/build/client/favicon.ico +0 -0
  90. package/build/client/locales/en/emails.json +11 -0
  91. package/build/client/locales/en/translation.json +411 -0
  92. package/build/client/locales/zh-CN/emails.json +11 -0
  93. package/build/client/locales/zh-CN/translation.json +1 -0
  94. package/build/client/locales/zh-TW/emails.json +11 -0
  95. package/build/client/locales/zh-TW/translation.json +1 -0
  96. package/build/client/logo-invert.png +0 -0
  97. package/build/client/logo.png +0 -0
  98. package/build/lib/adapter-factory-CLtf7vT5-CTKiMV2u.mjs +19675 -0
  99. package/build/lib/bun-sqlite-dialect-DN7EKoIB-0pWIoG0L.mjs +155 -0
  100. package/build/lib/chunk-BYI67GdN.mjs +1 -0
  101. package/build/lib/chunk-CkKlU7xI.mjs +44 -0
  102. package/build/lib/client-BtuhFgvy.mjs +65 -0
  103. package/build/lib/client.d.ts +2272 -0
  104. package/build/lib/client.js +24 -0
  105. package/build/lib/date.d.ts +1 -0
  106. package/build/lib/date.js +1 -0
  107. package/build/lib/dialect-BeMwdQoz-D41NdSow.mjs +72 -0
  108. package/build/lib/dist-cjs-B43A5HXv.mjs +169 -0
  109. package/build/lib/dist-cjs-B_wkbabY.mjs +214 -0
  110. package/build/lib/dist-cjs-BmbYbMhp.mjs +143 -0
  111. package/build/lib/dist-cjs-Cc337rwW.mjs +7 -0
  112. package/build/lib/dist-cjs-CgzfN8xY.mjs +4974 -0
  113. package/build/lib/dist-cjs-DBFcizQf.mjs +50 -0
  114. package/build/lib/dist-cjs-DC-UL-xx.mjs +97 -0
  115. package/build/lib/dist-cjs-DHlTgXUO.mjs +6975 -0
  116. package/build/lib/dist-cjs-DYAmJYzN.mjs +323 -0
  117. package/build/lib/dist-cjs-Ddm6Stp9.mjs +1294 -0
  118. package/build/lib/dist-cjs-GFGBhaZg.mjs +84 -0
  119. package/build/lib/dist-cjs-ieCOxrOi.mjs +181 -0
  120. package/build/lib/dist-cjs-nbOGa7i_.mjs +47 -0
  121. package/build/lib/dist-cjs-pN6ekzMW.mjs +66 -0
  122. package/build/lib/dist-cjs-yYlQ1OiO.mjs +102 -0
  123. package/build/lib/esm-DPet4lFW.mjs +15816 -0
  124. package/build/lib/event-streams-x9fP9BzF.mjs +185 -0
  125. package/build/lib/file-preview-dialog-Cugg8tEc.mjs +59 -0
  126. package/build/lib/kysely-adapter-BTWfu5rn.mjs +183 -0
  127. package/build/lib/magic-string.es-jZcifc5m.mjs +1013 -0
  128. package/build/lib/memory-adapter-DiU519m9.mjs +147 -0
  129. package/build/lib/node-ponyfill-Dmm1SWTU.mjs +38212 -0
  130. package/build/lib/node-sqlite-dialect-BqISUSC3-DYvTLBpY.mjs +155 -0
  131. package/build/lib/package-DfozRyK6.mjs +5 -0
  132. package/build/lib/react-dom-CPjM_WCt.mjs +42 -0
  133. package/build/lib/server.d.mts +76273 -0
  134. package/build/lib/server.mjs +325 -0
  135. package/build/lib/sso-oidc-Qom0PEDW.mjs +1036 -0
  136. package/build/lib/sts-CLRaHSW_.mjs +13 -0
  137. package/build/lib/sts-Dl7yZqX1.mjs +1405 -0
  138. package/build/lib/test.d.mts +8922 -0
  139. package/build/lib/test.mjs +175650 -0
  140. package/build/lib/ui/index.d.ts +1643 -0
  141. package/build/lib/ui/index.js +160 -0
  142. package/build/lib/utils.d.ts +21 -0
  143. package/build/lib/utils.js +1 -0
  144. package/build/lib/zod.d.ts +1 -0
  145. package/build/lib/zod.js +23 -0
  146. package/build/main.js +2383 -0
  147. package/build/server/assets/context-BoNg86Eh.js +35 -0
  148. package/build/server/assets/dialog-B8YbGNaz.js +54 -0
  149. package/build/server/assets/file-preview-dialog-qWSViOWQ.js +15 -0
  150. package/build/server/assets/react-CFQ4y0AA.js +13 -0
  151. package/build/server/assets/react-dom-Ca1YUVo2.js +5 -0
  152. package/build/server/assets/server-build-BMOfm0ad.js +118 -0
  153. package/build/server/assets/server.node-B2oksIp8.js +196 -0
  154. package/build/server/assets/server.node-VQzoub0A.js +1 -0
  155. package/build/server/index.js +123 -0
  156. package/package.json +224 -0
@@ -0,0 +1,2272 @@
1
+ import { ChangeEvent, DragEvent, InputHTMLAttributes, ReactNode } from "react";
2
+ import { AuthUIFeatures } from "#app/.server/primitives/auth.ts";
3
+ import * as _better_fetch_fetch0 from "@better-fetch/fetch";
4
+ import * as better_auth_client_plugins0 from "better-auth/client/plugins";
5
+ import * as better_auth0 from "better-auth";
6
+ import * as nanostores0 from "nanostores";
7
+ import { Socket } from "socket.io-client";
8
+ import { ClientToServerEvents, ServerToClientEvents } from "#app/.server/realtime.ts";
9
+
10
+ //#region app/hooks/use-env.d.ts
11
+ /**
12
+ * Hook to access public environment variables passed from the server.
13
+ * These are client-safe values that can be exposed to the browser.
14
+ *
15
+ * @example
16
+ * const env = useEnv();
17
+ * const siteKey = env.CF_TURNSTILE_SITE_KEY;
18
+ */
19
+ declare function useEnv(): {
20
+ APP_NAME: any;
21
+ APP_DESC: any;
22
+ CF_TURNSTILE_SITE_KEY: any;
23
+ };
24
+ //#endregion
25
+ //#region app/hooks/use-file-upload.d.ts
26
+ /**
27
+ * Core validation configuration shared between frontend and backend.
28
+ * This is the single source of truth for upload validation rules.
29
+ */
30
+ declare const UPLOAD_VALIDATION: {
31
+ readonly allowedExtensions: readonly ["jpg", "jpeg", "png", "gif", "svg", "webp", "mp4", "webm", "mp3", "wav", "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "md", "csv"];
32
+ readonly allowedContentTypes: readonly ["image/", "video/", "audio/", "application/pdf", "application/msword", "application/vnd.ms-", "application/vnd.openxmlformats", "text/"];
33
+ readonly maxFileSizes: {
34
+ readonly direct: number;
35
+ readonly server: number;
36
+ };
37
+ };
38
+ /**
39
+ * Check if a file extension is allowed.
40
+ */
41
+ declare function isValidFileExtension(filename: string): boolean;
42
+ /**
43
+ * Check if a content type is allowed.
44
+ */
45
+ declare function isValidContentType(contentType: string): boolean;
46
+ /**
47
+ * Generate an accept attribute value from allowed extensions.
48
+ * Converts extensions to both MIME types and .ext format for browser compatibility.
49
+ */
50
+ declare function generateAcceptAttribute(extensions?: string[]): string;
51
+ /**
52
+ * Validate a file upload (throws if invalid).
53
+ * Use this in backend tRPC procedures for consistent validation.
54
+ */
55
+ declare function validateUpload(filename: string, contentType: string): void;
56
+ /**
57
+ * Upload validation presets for common use cases.
58
+ * Frontend components use these for file input accept attributes.
59
+ * Backend uses UPLOAD_VALIDATION for actual validation.
60
+ */
61
+ declare const UPLOAD_PRESETS: {
62
+ readonly avatar: {
63
+ readonly maxSize: number;
64
+ readonly accept: string;
65
+ readonly multiple: false;
66
+ };
67
+ readonly image: {
68
+ readonly maxSize: number;
69
+ readonly accept: string;
70
+ readonly multiple: true;
71
+ };
72
+ readonly document: {
73
+ readonly maxSize: number;
74
+ readonly accept: string;
75
+ readonly multiple: true;
76
+ };
77
+ readonly file: {
78
+ readonly maxSize: number;
79
+ readonly accept: string;
80
+ readonly multiple: true;
81
+ };
82
+ };
83
+ type UploadPreset = keyof typeof UPLOAD_PRESETS;
84
+ /**
85
+ * Get an appropriate icon for a file based on its type and name.
86
+ * Used by UI components to display file type visually.
87
+ *
88
+ * @param file - File object with type and name information
89
+ * @param iconSize - Size class for the icon (default: "size-4")
90
+ * @returns React element with the appropriate icon
91
+ */
92
+ declare function getFileIcon(file: {
93
+ file: File | {
94
+ type: string;
95
+ name: string;
96
+ };
97
+ }, iconSize?: string): ReactNode;
98
+ /**
99
+ * Get a preview element for a file - either an image preview or file icon.
100
+ * Used by card/grid layouts to show visual previews.
101
+ *
102
+ * @param file - File object with type, name, and optional URL
103
+ * @param containerClassName - Additional CSS classes for the container
104
+ * @returns React element with preview or icon
105
+ */
106
+ declare function getFilePreview(file: {
107
+ file: File | {
108
+ type: string;
109
+ name: string;
110
+ url?: string;
111
+ };
112
+ preview?: string;
113
+ }, containerClassName?: string): ReactNode;
114
+ type FileMetadata = {
115
+ name: string;
116
+ size: number;
117
+ type: string;
118
+ url: string;
119
+ id: string;
120
+ };
121
+ type FileWithPreview = {
122
+ file: File | FileMetadata;
123
+ id: string;
124
+ preview?: string;
125
+ blobId?: string;
126
+ uploadStatus?: "pending" | "uploading" | "completed" | "error";
127
+ uploadProgress?: number;
128
+ uploadError?: string;
129
+ };
130
+ type FileUploadMessages = {
131
+ fileSizeError?: string;
132
+ fileTypeError?: string;
133
+ maxFilesError?: string;
134
+ maxFilesErrorSingle?: string;
135
+ };
136
+ type FileUploadOptions = {
137
+ preset?: UploadPreset;
138
+ maxFiles?: number;
139
+ maxSize?: number;
140
+ accept?: string;
141
+ multiple?: boolean;
142
+ messages?: FileUploadMessages;
143
+ initialFiles?: FileMetadata[];
144
+ onFilesChange?: (files: FileWithPreview[]) => void;
145
+ onFilesAdded?: (addedFiles: FileWithPreview[]) => void;
146
+ autoUpload?: boolean;
147
+ serviceName?: "private" | "public";
148
+ metadata?: Record<string, any>;
149
+ onFileUploaded?: (file: FileWithPreview) => void;
150
+ };
151
+ type FileUploadState = {
152
+ files: FileWithPreview[];
153
+ isDragging: boolean;
154
+ errors: string[];
155
+ };
156
+ type FileUploadActions = {
157
+ addFiles: (files: FileList | File[]) => void;
158
+ removeFile: (id: string) => void;
159
+ clearFiles: () => void;
160
+ clearErrors: () => void;
161
+ handleDragEnter: (e: DragEvent<HTMLElement>) => void;
162
+ handleDragLeave: (e: DragEvent<HTMLElement>) => void;
163
+ handleDragOver: (e: DragEvent<HTMLElement>) => void;
164
+ handleDrop: (e: DragEvent<HTMLElement>) => void;
165
+ handleFileChange: (e: ChangeEvent<HTMLInputElement>) => void;
166
+ openFileDialog: () => void;
167
+ getInputProps: (props?: InputHTMLAttributes<HTMLInputElement>) => InputHTMLAttributes<HTMLInputElement> & {
168
+ ref: any;
169
+ };
170
+ };
171
+ declare const useFileUpload: (options?: FileUploadOptions) => [FileUploadState, FileUploadActions];
172
+ declare const formatBytes: (bytes: number, decimals?: number) => string;
173
+ //#endregion
174
+ //#region app/lib/auth.d.ts
175
+ /**
176
+ * The options for defining the auth client.
177
+ */
178
+ interface DefineAuthClientOptions {
179
+ /**
180
+ * UI-safe feature flags from server.
181
+ *
182
+ * Used to conditionally enable client-side plugins based on server configuration.
183
+ */
184
+ features: AuthUIFeatures;
185
+ }
186
+ /**
187
+ * Define the authentication client for the application.
188
+ *
189
+ * @param param0 The options for defining the auth client.
190
+ * @returns
191
+ */
192
+ declare function defineAuthClient({
193
+ features
194
+ }: DefineAuthClientOptions): {
195
+ signIn: {
196
+ social: <FetchOptions extends {
197
+ headers?: (HeadersInit & (HeadersInit | {
198
+ accept: "application/json" | "text/plain" | "application/octet-stream";
199
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
200
+ authorization: "Bearer" | "Basic";
201
+ })) | undefined;
202
+ cache?: RequestCache | undefined;
203
+ credentials?: RequestCredentials | undefined;
204
+ integrity?: string | undefined;
205
+ keepalive?: boolean | undefined;
206
+ method?: string | undefined;
207
+ mode?: RequestMode | undefined;
208
+ priority?: RequestPriority | undefined;
209
+ redirect?: RequestRedirect | undefined;
210
+ referrer?: string | undefined;
211
+ referrerPolicy?: ReferrerPolicy | undefined;
212
+ signal?: (AbortSignal | null) | undefined;
213
+ window?: null | undefined;
214
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
215
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
216
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
217
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
218
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
219
+ hookOptions?: {
220
+ cloneResponse?: boolean;
221
+ } | undefined;
222
+ timeout?: number | undefined;
223
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
224
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
225
+ baseURL?: string | undefined;
226
+ throw?: boolean | undefined;
227
+ auth?: ({
228
+ type: "Bearer";
229
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
230
+ } | {
231
+ type: "Basic";
232
+ username: string | (() => string | undefined) | undefined;
233
+ password: string | (() => string | undefined) | undefined;
234
+ } | {
235
+ type: "Custom";
236
+ prefix: string | (() => string | undefined) | undefined;
237
+ value: string | (() => string | undefined) | undefined;
238
+ }) | undefined;
239
+ body?: (Partial<{
240
+ provider: unknown;
241
+ callbackURL?: string | undefined;
242
+ newUserCallbackURL?: string | undefined;
243
+ errorCallbackURL?: string | undefined;
244
+ disableRedirect?: boolean | undefined;
245
+ idToken?: {
246
+ token: string;
247
+ nonce?: string | undefined;
248
+ accessToken?: string | undefined;
249
+ refreshToken?: string | undefined;
250
+ expiresAt?: number | undefined;
251
+ } | undefined;
252
+ scopes?: string[] | undefined;
253
+ requestSignUp?: boolean | undefined;
254
+ loginHint?: string | undefined;
255
+ additionalData?: Record<string, any> | undefined;
256
+ }> & Record<string, any>) | undefined;
257
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
258
+ params?: Record<string, any> | undefined;
259
+ duplex?: "full" | "half" | undefined;
260
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
261
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
262
+ retryAttempt?: number | undefined;
263
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
264
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
265
+ disableValidation?: boolean | undefined;
266
+ }>(data_0: better_auth_client_plugins0.Prettify<{
267
+ provider: unknown;
268
+ callbackURL?: string | undefined;
269
+ newUserCallbackURL?: string | undefined;
270
+ errorCallbackURL?: string | undefined;
271
+ disableRedirect?: boolean | undefined;
272
+ idToken?: {
273
+ token: string;
274
+ nonce?: string | undefined;
275
+ accessToken?: string | undefined;
276
+ refreshToken?: string | undefined;
277
+ expiresAt?: number | undefined;
278
+ } | undefined;
279
+ scopes?: string[] | undefined;
280
+ requestSignUp?: boolean | undefined;
281
+ loginHint?: string | undefined;
282
+ additionalData?: Record<string, any> | undefined;
283
+ } & {
284
+ fetchOptions?: FetchOptions | undefined;
285
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<NonNullable<{
286
+ redirect: boolean;
287
+ token: string;
288
+ url: undefined;
289
+ user: {
290
+ id: string;
291
+ email: string;
292
+ name: string;
293
+ image: string | null | undefined;
294
+ emailVerified: boolean;
295
+ createdAt: Date;
296
+ updatedAt: Date;
297
+ };
298
+ } | {
299
+ url: string;
300
+ redirect: boolean;
301
+ }>, {
302
+ code?: string | undefined;
303
+ message?: string | undefined;
304
+ }, FetchOptions["throw"] extends true ? true : false>>;
305
+ };
306
+ } & {
307
+ signOut: <FetchOptions extends {
308
+ headers?: (HeadersInit & (HeadersInit | {
309
+ accept: "application/json" | "text/plain" | "application/octet-stream";
310
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
311
+ authorization: "Bearer" | "Basic";
312
+ })) | undefined;
313
+ cache?: RequestCache | undefined;
314
+ credentials?: RequestCredentials | undefined;
315
+ integrity?: string | undefined;
316
+ keepalive?: boolean | undefined;
317
+ method?: string | undefined;
318
+ mode?: RequestMode | undefined;
319
+ priority?: RequestPriority | undefined;
320
+ redirect?: RequestRedirect | undefined;
321
+ referrer?: string | undefined;
322
+ referrerPolicy?: ReferrerPolicy | undefined;
323
+ signal?: (AbortSignal | null) | undefined;
324
+ window?: null | undefined;
325
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
326
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
327
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
328
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
329
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
330
+ hookOptions?: {
331
+ cloneResponse?: boolean;
332
+ } | undefined;
333
+ timeout?: number | undefined;
334
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
335
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
336
+ baseURL?: string | undefined;
337
+ throw?: boolean | undefined;
338
+ auth?: ({
339
+ type: "Bearer";
340
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
341
+ } | {
342
+ type: "Basic";
343
+ username: string | (() => string | undefined) | undefined;
344
+ password: string | (() => string | undefined) | undefined;
345
+ } | {
346
+ type: "Custom";
347
+ prefix: string | (() => string | undefined) | undefined;
348
+ value: string | (() => string | undefined) | undefined;
349
+ }) | undefined;
350
+ body?: undefined;
351
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
352
+ params?: Record<string, any> | undefined;
353
+ duplex?: "full" | "half" | undefined;
354
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
355
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
356
+ retryAttempt?: number | undefined;
357
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
358
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
359
+ disableValidation?: boolean | undefined;
360
+ }>(data_0?: better_auth_client_plugins0.Prettify<{
361
+ query?: Record<string, any> | undefined;
362
+ fetchOptions?: FetchOptions | undefined;
363
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
364
+ success: boolean;
365
+ }, {
366
+ code?: string | undefined;
367
+ message?: string | undefined;
368
+ }, FetchOptions["throw"] extends true ? true : false>>;
369
+ } & {
370
+ signUp: {
371
+ email: <FetchOptions extends {
372
+ headers?: (HeadersInit & (HeadersInit | {
373
+ accept: "application/json" | "text/plain" | "application/octet-stream";
374
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
375
+ authorization: "Bearer" | "Basic";
376
+ })) | undefined;
377
+ cache?: RequestCache | undefined;
378
+ credentials?: RequestCredentials | undefined;
379
+ integrity?: string | undefined;
380
+ keepalive?: boolean | undefined;
381
+ method?: string | undefined;
382
+ mode?: RequestMode | undefined;
383
+ priority?: RequestPriority | undefined;
384
+ redirect?: RequestRedirect | undefined;
385
+ referrer?: string | undefined;
386
+ referrerPolicy?: ReferrerPolicy | undefined;
387
+ signal?: (AbortSignal | null) | undefined;
388
+ window?: null | undefined;
389
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
390
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
391
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
392
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
393
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
394
+ hookOptions?: {
395
+ cloneResponse?: boolean;
396
+ } | undefined;
397
+ timeout?: number | undefined;
398
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
399
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
400
+ baseURL?: string | undefined;
401
+ throw?: boolean | undefined;
402
+ auth?: ({
403
+ type: "Bearer";
404
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
405
+ } | {
406
+ type: "Basic";
407
+ username: string | (() => string | undefined) | undefined;
408
+ password: string | (() => string | undefined) | undefined;
409
+ } | {
410
+ type: "Custom";
411
+ prefix: string | (() => string | undefined) | undefined;
412
+ value: string | (() => string | undefined) | undefined;
413
+ }) | undefined;
414
+ body?: (Partial<{
415
+ name: string;
416
+ email: string;
417
+ password: string;
418
+ image?: string | undefined;
419
+ callbackURL?: string | undefined;
420
+ rememberMe?: boolean | undefined;
421
+ }> & Record<string, any>) | undefined;
422
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
423
+ params?: Record<string, any> | undefined;
424
+ duplex?: "full" | "half" | undefined;
425
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
426
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
427
+ retryAttempt?: number | undefined;
428
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
429
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
430
+ disableValidation?: boolean | undefined;
431
+ }>(data_0: better_auth_client_plugins0.Prettify<{
432
+ email: string;
433
+ name: string;
434
+ password: string;
435
+ image?: string | undefined;
436
+ callbackURL?: string | undefined;
437
+ fetchOptions?: FetchOptions | undefined;
438
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<NonNullable<{
439
+ token: null;
440
+ user: {
441
+ id: string;
442
+ email: string;
443
+ name: string;
444
+ image: string | null | undefined;
445
+ emailVerified: boolean;
446
+ createdAt: Date;
447
+ updatedAt: Date;
448
+ };
449
+ } | {
450
+ token: string;
451
+ user: {
452
+ id: string;
453
+ email: string;
454
+ name: string;
455
+ image: string | null | undefined;
456
+ emailVerified: boolean;
457
+ createdAt: Date;
458
+ updatedAt: Date;
459
+ };
460
+ }>, {
461
+ code?: string | undefined;
462
+ message?: string | undefined;
463
+ }, FetchOptions["throw"] extends true ? true : false>>;
464
+ };
465
+ } & {
466
+ signIn: {
467
+ email: <FetchOptions extends {
468
+ headers?: (HeadersInit & (HeadersInit | {
469
+ accept: "application/json" | "text/plain" | "application/octet-stream";
470
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
471
+ authorization: "Bearer" | "Basic";
472
+ })) | undefined;
473
+ cache?: RequestCache | undefined;
474
+ credentials?: RequestCredentials | undefined;
475
+ integrity?: string | undefined;
476
+ keepalive?: boolean | undefined;
477
+ method?: string | undefined;
478
+ mode?: RequestMode | undefined;
479
+ priority?: RequestPriority | undefined;
480
+ redirect?: RequestRedirect | undefined;
481
+ referrer?: string | undefined;
482
+ referrerPolicy?: ReferrerPolicy | undefined;
483
+ signal?: (AbortSignal | null) | undefined;
484
+ window?: null | undefined;
485
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
486
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
487
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
488
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
489
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
490
+ hookOptions?: {
491
+ cloneResponse?: boolean;
492
+ } | undefined;
493
+ timeout?: number | undefined;
494
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
495
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
496
+ baseURL?: string | undefined;
497
+ throw?: boolean | undefined;
498
+ auth?: ({
499
+ type: "Bearer";
500
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
501
+ } | {
502
+ type: "Basic";
503
+ username: string | (() => string | undefined) | undefined;
504
+ password: string | (() => string | undefined) | undefined;
505
+ } | {
506
+ type: "Custom";
507
+ prefix: string | (() => string | undefined) | undefined;
508
+ value: string | (() => string | undefined) | undefined;
509
+ }) | undefined;
510
+ body?: (Partial<{
511
+ email: string;
512
+ password: string;
513
+ callbackURL?: string | undefined;
514
+ rememberMe?: boolean | undefined;
515
+ }> & Record<string, any>) | undefined;
516
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
517
+ params?: Record<string, any> | undefined;
518
+ duplex?: "full" | "half" | undefined;
519
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
520
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
521
+ retryAttempt?: number | undefined;
522
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
523
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
524
+ disableValidation?: boolean | undefined;
525
+ }>(data_0: better_auth_client_plugins0.Prettify<{
526
+ email: string;
527
+ password: string;
528
+ callbackURL?: string | undefined;
529
+ rememberMe?: boolean | undefined;
530
+ } & {
531
+ fetchOptions?: FetchOptions | undefined;
532
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
533
+ redirect: boolean;
534
+ token: string;
535
+ url: string | undefined;
536
+ user: {
537
+ id: string;
538
+ email: string;
539
+ name: string;
540
+ image: string | null | undefined;
541
+ emailVerified: boolean;
542
+ createdAt: Date;
543
+ updatedAt: Date;
544
+ };
545
+ }, {
546
+ code?: string | undefined;
547
+ message?: string | undefined;
548
+ }, FetchOptions["throw"] extends true ? true : false>>;
549
+ };
550
+ } & {
551
+ resetPassword: <FetchOptions extends {
552
+ headers?: (HeadersInit & (HeadersInit | {
553
+ accept: "application/json" | "text/plain" | "application/octet-stream";
554
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
555
+ authorization: "Bearer" | "Basic";
556
+ })) | undefined;
557
+ cache?: RequestCache | undefined;
558
+ credentials?: RequestCredentials | undefined;
559
+ integrity?: string | undefined;
560
+ keepalive?: boolean | undefined;
561
+ method?: string | undefined;
562
+ mode?: RequestMode | undefined;
563
+ priority?: RequestPriority | undefined;
564
+ redirect?: RequestRedirect | undefined;
565
+ referrer?: string | undefined;
566
+ referrerPolicy?: ReferrerPolicy | undefined;
567
+ signal?: (AbortSignal | null) | undefined;
568
+ window?: null | undefined;
569
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
570
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
571
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
572
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
573
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
574
+ hookOptions?: {
575
+ cloneResponse?: boolean;
576
+ } | undefined;
577
+ timeout?: number | undefined;
578
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
579
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
580
+ baseURL?: string | undefined;
581
+ throw?: boolean | undefined;
582
+ auth?: ({
583
+ type: "Bearer";
584
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
585
+ } | {
586
+ type: "Basic";
587
+ username: string | (() => string | undefined) | undefined;
588
+ password: string | (() => string | undefined) | undefined;
589
+ } | {
590
+ type: "Custom";
591
+ prefix: string | (() => string | undefined) | undefined;
592
+ value: string | (() => string | undefined) | undefined;
593
+ }) | undefined;
594
+ body?: (Partial<{
595
+ newPassword: string;
596
+ token?: string | undefined;
597
+ }> & Record<string, any>) | undefined;
598
+ query?: (Partial<{
599
+ token?: string | undefined;
600
+ }> & Record<string, any>) | undefined;
601
+ params?: Record<string, any> | undefined;
602
+ duplex?: "full" | "half" | undefined;
603
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
604
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
605
+ retryAttempt?: number | undefined;
606
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
607
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
608
+ disableValidation?: boolean | undefined;
609
+ }>(data_0: better_auth_client_plugins0.Prettify<{
610
+ newPassword: string;
611
+ token?: string | undefined;
612
+ } & {
613
+ fetchOptions?: FetchOptions | undefined;
614
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
615
+ status: boolean;
616
+ }, {
617
+ code?: string | undefined;
618
+ message?: string | undefined;
619
+ }, FetchOptions["throw"] extends true ? true : false>>;
620
+ } & {
621
+ verifyEmail: <FetchOptions extends {
622
+ headers?: (HeadersInit & (HeadersInit | {
623
+ accept: "application/json" | "text/plain" | "application/octet-stream";
624
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
625
+ authorization: "Bearer" | "Basic";
626
+ })) | undefined;
627
+ cache?: RequestCache | undefined;
628
+ credentials?: RequestCredentials | undefined;
629
+ integrity?: string | undefined;
630
+ keepalive?: boolean | undefined;
631
+ method?: string | undefined;
632
+ mode?: RequestMode | undefined;
633
+ priority?: RequestPriority | undefined;
634
+ redirect?: RequestRedirect | undefined;
635
+ referrer?: string | undefined;
636
+ referrerPolicy?: ReferrerPolicy | undefined;
637
+ signal?: (AbortSignal | null) | undefined;
638
+ window?: null | undefined;
639
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
640
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
641
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
642
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
643
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
644
+ hookOptions?: {
645
+ cloneResponse?: boolean;
646
+ } | undefined;
647
+ timeout?: number | undefined;
648
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
649
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
650
+ baseURL?: string | undefined;
651
+ throw?: boolean | undefined;
652
+ auth?: ({
653
+ type: "Bearer";
654
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
655
+ } | {
656
+ type: "Basic";
657
+ username: string | (() => string | undefined) | undefined;
658
+ password: string | (() => string | undefined) | undefined;
659
+ } | {
660
+ type: "Custom";
661
+ prefix: string | (() => string | undefined) | undefined;
662
+ value: string | (() => string | undefined) | undefined;
663
+ }) | undefined;
664
+ body?: undefined;
665
+ query?: (Partial<{
666
+ token: string;
667
+ callbackURL?: string | undefined;
668
+ }> & Record<string, any>) | undefined;
669
+ params?: Record<string, any> | undefined;
670
+ duplex?: "full" | "half" | undefined;
671
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
672
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
673
+ retryAttempt?: number | undefined;
674
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
675
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
676
+ disableValidation?: boolean | undefined;
677
+ }>(data_0: better_auth_client_plugins0.Prettify<{
678
+ query: {
679
+ token: string;
680
+ callbackURL?: string | undefined;
681
+ };
682
+ fetchOptions?: FetchOptions | undefined;
683
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<NonNullable<void | {
684
+ status: boolean;
685
+ user: {
686
+ id: string;
687
+ email: string;
688
+ name: string;
689
+ image: string | null | undefined;
690
+ emailVerified: boolean;
691
+ createdAt: Date;
692
+ updatedAt: Date;
693
+ };
694
+ } | {
695
+ status: boolean;
696
+ user: null;
697
+ }>, {
698
+ code?: string | undefined;
699
+ message?: string | undefined;
700
+ }, FetchOptions["throw"] extends true ? true : false>>;
701
+ } & {
702
+ sendVerificationEmail: <FetchOptions extends {
703
+ headers?: (HeadersInit & (HeadersInit | {
704
+ accept: "application/json" | "text/plain" | "application/octet-stream";
705
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
706
+ authorization: "Bearer" | "Basic";
707
+ })) | undefined;
708
+ cache?: RequestCache | undefined;
709
+ credentials?: RequestCredentials | undefined;
710
+ integrity?: string | undefined;
711
+ keepalive?: boolean | undefined;
712
+ method?: string | undefined;
713
+ mode?: RequestMode | undefined;
714
+ priority?: RequestPriority | undefined;
715
+ redirect?: RequestRedirect | undefined;
716
+ referrer?: string | undefined;
717
+ referrerPolicy?: ReferrerPolicy | undefined;
718
+ signal?: (AbortSignal | null) | undefined;
719
+ window?: null | undefined;
720
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
721
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
722
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
723
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
724
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
725
+ hookOptions?: {
726
+ cloneResponse?: boolean;
727
+ } | undefined;
728
+ timeout?: number | undefined;
729
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
730
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
731
+ baseURL?: string | undefined;
732
+ throw?: boolean | undefined;
733
+ auth?: ({
734
+ type: "Bearer";
735
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
736
+ } | {
737
+ type: "Basic";
738
+ username: string | (() => string | undefined) | undefined;
739
+ password: string | (() => string | undefined) | undefined;
740
+ } | {
741
+ type: "Custom";
742
+ prefix: string | (() => string | undefined) | undefined;
743
+ value: string | (() => string | undefined) | undefined;
744
+ }) | undefined;
745
+ body?: (Partial<{
746
+ email: string;
747
+ callbackURL?: string | undefined;
748
+ }> & Record<string, any>) | undefined;
749
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
750
+ params?: Record<string, any> | undefined;
751
+ duplex?: "full" | "half" | undefined;
752
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
753
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
754
+ retryAttempt?: number | undefined;
755
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
756
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
757
+ disableValidation?: boolean | undefined;
758
+ }>(data_0: better_auth_client_plugins0.Prettify<{
759
+ email: string;
760
+ callbackURL?: string | undefined;
761
+ } & {
762
+ fetchOptions?: FetchOptions | undefined;
763
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
764
+ status: boolean;
765
+ }, {
766
+ code?: string | undefined;
767
+ message?: string | undefined;
768
+ }, FetchOptions["throw"] extends true ? true : false>>;
769
+ } & {
770
+ changeEmail: <FetchOptions extends {
771
+ headers?: (HeadersInit & (HeadersInit | {
772
+ accept: "application/json" | "text/plain" | "application/octet-stream";
773
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
774
+ authorization: "Bearer" | "Basic";
775
+ })) | undefined;
776
+ cache?: RequestCache | undefined;
777
+ credentials?: RequestCredentials | undefined;
778
+ integrity?: string | undefined;
779
+ keepalive?: boolean | undefined;
780
+ method?: string | undefined;
781
+ mode?: RequestMode | undefined;
782
+ priority?: RequestPriority | undefined;
783
+ redirect?: RequestRedirect | undefined;
784
+ referrer?: string | undefined;
785
+ referrerPolicy?: ReferrerPolicy | undefined;
786
+ signal?: (AbortSignal | null) | undefined;
787
+ window?: null | undefined;
788
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
789
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
790
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
791
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
792
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
793
+ hookOptions?: {
794
+ cloneResponse?: boolean;
795
+ } | undefined;
796
+ timeout?: number | undefined;
797
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
798
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
799
+ baseURL?: string | undefined;
800
+ throw?: boolean | undefined;
801
+ auth?: ({
802
+ type: "Bearer";
803
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
804
+ } | {
805
+ type: "Basic";
806
+ username: string | (() => string | undefined) | undefined;
807
+ password: string | (() => string | undefined) | undefined;
808
+ } | {
809
+ type: "Custom";
810
+ prefix: string | (() => string | undefined) | undefined;
811
+ value: string | (() => string | undefined) | undefined;
812
+ }) | undefined;
813
+ body?: (Partial<{
814
+ newEmail: string;
815
+ callbackURL?: string | undefined;
816
+ }> & Record<string, any>) | undefined;
817
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
818
+ params?: Record<string, any> | undefined;
819
+ duplex?: "full" | "half" | undefined;
820
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
821
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
822
+ retryAttempt?: number | undefined;
823
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
824
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
825
+ disableValidation?: boolean | undefined;
826
+ }>(data_0: better_auth_client_plugins0.Prettify<{
827
+ newEmail: string;
828
+ callbackURL?: string | undefined;
829
+ } & {
830
+ fetchOptions?: FetchOptions | undefined;
831
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
832
+ status: boolean;
833
+ }, {
834
+ code?: string | undefined;
835
+ message?: string | undefined;
836
+ }, FetchOptions["throw"] extends true ? true : false>>;
837
+ } & {
838
+ changePassword: <FetchOptions extends {
839
+ headers?: (HeadersInit & (HeadersInit | {
840
+ accept: "application/json" | "text/plain" | "application/octet-stream";
841
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
842
+ authorization: "Bearer" | "Basic";
843
+ })) | undefined;
844
+ cache?: RequestCache | undefined;
845
+ credentials?: RequestCredentials | undefined;
846
+ integrity?: string | undefined;
847
+ keepalive?: boolean | undefined;
848
+ method?: string | undefined;
849
+ mode?: RequestMode | undefined;
850
+ priority?: RequestPriority | undefined;
851
+ redirect?: RequestRedirect | undefined;
852
+ referrer?: string | undefined;
853
+ referrerPolicy?: ReferrerPolicy | undefined;
854
+ signal?: (AbortSignal | null) | undefined;
855
+ window?: null | undefined;
856
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
857
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
858
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
859
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
860
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
861
+ hookOptions?: {
862
+ cloneResponse?: boolean;
863
+ } | undefined;
864
+ timeout?: number | undefined;
865
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
866
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
867
+ baseURL?: string | undefined;
868
+ throw?: boolean | undefined;
869
+ auth?: ({
870
+ type: "Bearer";
871
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
872
+ } | {
873
+ type: "Basic";
874
+ username: string | (() => string | undefined) | undefined;
875
+ password: string | (() => string | undefined) | undefined;
876
+ } | {
877
+ type: "Custom";
878
+ prefix: string | (() => string | undefined) | undefined;
879
+ value: string | (() => string | undefined) | undefined;
880
+ }) | undefined;
881
+ body?: (Partial<{
882
+ newPassword: string;
883
+ currentPassword: string;
884
+ revokeOtherSessions?: boolean | undefined;
885
+ }> & Record<string, any>) | undefined;
886
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
887
+ params?: Record<string, any> | undefined;
888
+ duplex?: "full" | "half" | undefined;
889
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
890
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
891
+ retryAttempt?: number | undefined;
892
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
893
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
894
+ disableValidation?: boolean | undefined;
895
+ }>(data_0: better_auth_client_plugins0.Prettify<{
896
+ newPassword: string;
897
+ currentPassword: string;
898
+ revokeOtherSessions?: boolean | undefined;
899
+ } & {
900
+ fetchOptions?: FetchOptions | undefined;
901
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
902
+ token: string | null;
903
+ user: {
904
+ id: string;
905
+ email: string;
906
+ name: string;
907
+ image: string | null | undefined;
908
+ emailVerified: boolean;
909
+ createdAt: Date;
910
+ updatedAt: Date;
911
+ };
912
+ }, {
913
+ code?: string | undefined;
914
+ message?: string | undefined;
915
+ }, FetchOptions["throw"] extends true ? true : false>>;
916
+ } & {
917
+ updateUser: <FetchOptions extends {
918
+ headers?: (HeadersInit & (HeadersInit | {
919
+ accept: "application/json" | "text/plain" | "application/octet-stream";
920
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
921
+ authorization: "Bearer" | "Basic";
922
+ })) | undefined;
923
+ cache?: RequestCache | undefined;
924
+ credentials?: RequestCredentials | undefined;
925
+ integrity?: string | undefined;
926
+ keepalive?: boolean | undefined;
927
+ method?: string | undefined;
928
+ mode?: RequestMode | undefined;
929
+ priority?: RequestPriority | undefined;
930
+ redirect?: RequestRedirect | undefined;
931
+ referrer?: string | undefined;
932
+ referrerPolicy?: ReferrerPolicy | undefined;
933
+ signal?: (AbortSignal | null) | undefined;
934
+ window?: null | undefined;
935
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
936
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
937
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
938
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
939
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
940
+ hookOptions?: {
941
+ cloneResponse?: boolean;
942
+ } | undefined;
943
+ timeout?: number | undefined;
944
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
945
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
946
+ baseURL?: string | undefined;
947
+ throw?: boolean | undefined;
948
+ auth?: ({
949
+ type: "Bearer";
950
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
951
+ } | {
952
+ type: "Basic";
953
+ username: string | (() => string | undefined) | undefined;
954
+ password: string | (() => string | undefined) | undefined;
955
+ } | {
956
+ type: "Custom";
957
+ prefix: string | (() => string | undefined) | undefined;
958
+ value: string | (() => string | undefined) | undefined;
959
+ }) | undefined;
960
+ body?: (Partial<Partial<{}> & {
961
+ name?: string | undefined;
962
+ image?: string | undefined;
963
+ }> & Record<string, any>) | undefined;
964
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
965
+ params?: Record<string, any> | undefined;
966
+ duplex?: "full" | "half" | undefined;
967
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
968
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
969
+ retryAttempt?: number | undefined;
970
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
971
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
972
+ disableValidation?: boolean | undefined;
973
+ }>(data_0?: better_auth_client_plugins0.Prettify<{
974
+ image?: (string | null) | undefined;
975
+ name?: string | undefined;
976
+ fetchOptions?: FetchOptions | undefined;
977
+ } & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
978
+ status: boolean;
979
+ }, {
980
+ code?: string | undefined;
981
+ message?: string | undefined;
982
+ }, FetchOptions["throw"] extends true ? true : false>>;
983
+ } & {
984
+ deleteUser: <FetchOptions extends {
985
+ headers?: (HeadersInit & (HeadersInit | {
986
+ accept: "application/json" | "text/plain" | "application/octet-stream";
987
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
988
+ authorization: "Bearer" | "Basic";
989
+ })) | undefined;
990
+ cache?: RequestCache | undefined;
991
+ credentials?: RequestCredentials | undefined;
992
+ integrity?: string | undefined;
993
+ keepalive?: boolean | undefined;
994
+ method?: string | undefined;
995
+ mode?: RequestMode | undefined;
996
+ priority?: RequestPriority | undefined;
997
+ redirect?: RequestRedirect | undefined;
998
+ referrer?: string | undefined;
999
+ referrerPolicy?: ReferrerPolicy | undefined;
1000
+ signal?: (AbortSignal | null) | undefined;
1001
+ window?: null | undefined;
1002
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1003
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1004
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1005
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1006
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1007
+ hookOptions?: {
1008
+ cloneResponse?: boolean;
1009
+ } | undefined;
1010
+ timeout?: number | undefined;
1011
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1012
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1013
+ baseURL?: string | undefined;
1014
+ throw?: boolean | undefined;
1015
+ auth?: ({
1016
+ type: "Bearer";
1017
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1018
+ } | {
1019
+ type: "Basic";
1020
+ username: string | (() => string | undefined) | undefined;
1021
+ password: string | (() => string | undefined) | undefined;
1022
+ } | {
1023
+ type: "Custom";
1024
+ prefix: string | (() => string | undefined) | undefined;
1025
+ value: string | (() => string | undefined) | undefined;
1026
+ }) | undefined;
1027
+ body?: (Partial<{
1028
+ callbackURL?: string | undefined;
1029
+ password?: string | undefined;
1030
+ token?: string | undefined;
1031
+ }> & Record<string, any>) | undefined;
1032
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1033
+ params?: Record<string, any> | undefined;
1034
+ duplex?: "full" | "half" | undefined;
1035
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1036
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1037
+ retryAttempt?: number | undefined;
1038
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1039
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1040
+ disableValidation?: boolean | undefined;
1041
+ }>(data_0?: better_auth_client_plugins0.Prettify<{
1042
+ callbackURL?: string | undefined;
1043
+ password?: string | undefined;
1044
+ token?: string | undefined;
1045
+ } & {
1046
+ fetchOptions?: FetchOptions | undefined;
1047
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1048
+ success: boolean;
1049
+ message: string;
1050
+ }, {
1051
+ code?: string | undefined;
1052
+ message?: string | undefined;
1053
+ }, FetchOptions["throw"] extends true ? true : false>>;
1054
+ } & {
1055
+ requestPasswordReset: <FetchOptions extends {
1056
+ headers?: (HeadersInit & (HeadersInit | {
1057
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1058
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1059
+ authorization: "Bearer" | "Basic";
1060
+ })) | undefined;
1061
+ cache?: RequestCache | undefined;
1062
+ credentials?: RequestCredentials | undefined;
1063
+ integrity?: string | undefined;
1064
+ keepalive?: boolean | undefined;
1065
+ method?: string | undefined;
1066
+ mode?: RequestMode | undefined;
1067
+ priority?: RequestPriority | undefined;
1068
+ redirect?: RequestRedirect | undefined;
1069
+ referrer?: string | undefined;
1070
+ referrerPolicy?: ReferrerPolicy | undefined;
1071
+ signal?: (AbortSignal | null) | undefined;
1072
+ window?: null | undefined;
1073
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1074
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1075
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1076
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1077
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1078
+ hookOptions?: {
1079
+ cloneResponse?: boolean;
1080
+ } | undefined;
1081
+ timeout?: number | undefined;
1082
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1083
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1084
+ baseURL?: string | undefined;
1085
+ throw?: boolean | undefined;
1086
+ auth?: ({
1087
+ type: "Bearer";
1088
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1089
+ } | {
1090
+ type: "Basic";
1091
+ username: string | (() => string | undefined) | undefined;
1092
+ password: string | (() => string | undefined) | undefined;
1093
+ } | {
1094
+ type: "Custom";
1095
+ prefix: string | (() => string | undefined) | undefined;
1096
+ value: string | (() => string | undefined) | undefined;
1097
+ }) | undefined;
1098
+ body?: (Partial<{
1099
+ email: string;
1100
+ redirectTo?: string | undefined;
1101
+ }> & Record<string, any>) | undefined;
1102
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1103
+ params?: Record<string, any> | undefined;
1104
+ duplex?: "full" | "half" | undefined;
1105
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1106
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1107
+ retryAttempt?: number | undefined;
1108
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1109
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1110
+ disableValidation?: boolean | undefined;
1111
+ }>(data_0: better_auth_client_plugins0.Prettify<{
1112
+ email: string;
1113
+ redirectTo?: string | undefined;
1114
+ } & {
1115
+ fetchOptions?: FetchOptions | undefined;
1116
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1117
+ status: boolean;
1118
+ message: string;
1119
+ }, {
1120
+ code?: string | undefined;
1121
+ message?: string | undefined;
1122
+ }, FetchOptions["throw"] extends true ? true : false>>;
1123
+ } & {
1124
+ resetPassword: {
1125
+ ":token": <FetchOptions extends {
1126
+ headers?: (HeadersInit & (HeadersInit | {
1127
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1128
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1129
+ authorization: "Bearer" | "Basic";
1130
+ })) | undefined;
1131
+ cache?: RequestCache | undefined;
1132
+ credentials?: RequestCredentials | undefined;
1133
+ integrity?: string | undefined;
1134
+ keepalive?: boolean | undefined;
1135
+ method?: string | undefined;
1136
+ mode?: RequestMode | undefined;
1137
+ priority?: RequestPriority | undefined;
1138
+ redirect?: RequestRedirect | undefined;
1139
+ referrer?: string | undefined;
1140
+ referrerPolicy?: ReferrerPolicy | undefined;
1141
+ signal?: (AbortSignal | null) | undefined;
1142
+ window?: null | undefined;
1143
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1144
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1145
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1146
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1147
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1148
+ hookOptions?: {
1149
+ cloneResponse?: boolean;
1150
+ } | undefined;
1151
+ timeout?: number | undefined;
1152
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1153
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1154
+ baseURL?: string | undefined;
1155
+ throw?: boolean | undefined;
1156
+ auth?: ({
1157
+ type: "Bearer";
1158
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1159
+ } | {
1160
+ type: "Basic";
1161
+ username: string | (() => string | undefined) | undefined;
1162
+ password: string | (() => string | undefined) | undefined;
1163
+ } | {
1164
+ type: "Custom";
1165
+ prefix: string | (() => string | undefined) | undefined;
1166
+ value: string | (() => string | undefined) | undefined;
1167
+ }) | undefined;
1168
+ body?: undefined;
1169
+ query?: (Partial<{
1170
+ callbackURL: string;
1171
+ }> & Record<string, any>) | undefined;
1172
+ params?: {
1173
+ token: string;
1174
+ } | undefined;
1175
+ duplex?: "full" | "half" | undefined;
1176
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1177
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1178
+ retryAttempt?: number | undefined;
1179
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1180
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1181
+ disableValidation?: boolean | undefined;
1182
+ }>(data_0: better_auth_client_plugins0.Prettify<{
1183
+ query: {
1184
+ callbackURL: string;
1185
+ };
1186
+ fetchOptions?: FetchOptions | undefined;
1187
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<never, {
1188
+ code?: string | undefined;
1189
+ message?: string | undefined;
1190
+ }, FetchOptions["throw"] extends true ? true : false>>;
1191
+ };
1192
+ } & {
1193
+ listSessions: <FetchOptions extends {
1194
+ headers?: (HeadersInit & (HeadersInit | {
1195
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1196
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1197
+ authorization: "Bearer" | "Basic";
1198
+ })) | undefined;
1199
+ cache?: RequestCache | undefined;
1200
+ credentials?: RequestCredentials | undefined;
1201
+ integrity?: string | undefined;
1202
+ keepalive?: boolean | undefined;
1203
+ method?: string | undefined;
1204
+ mode?: RequestMode | undefined;
1205
+ priority?: RequestPriority | undefined;
1206
+ redirect?: RequestRedirect | undefined;
1207
+ referrer?: string | undefined;
1208
+ referrerPolicy?: ReferrerPolicy | undefined;
1209
+ signal?: (AbortSignal | null) | undefined;
1210
+ window?: null | undefined;
1211
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1212
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1213
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1214
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1215
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1216
+ hookOptions?: {
1217
+ cloneResponse?: boolean;
1218
+ } | undefined;
1219
+ timeout?: number | undefined;
1220
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1221
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1222
+ baseURL?: string | undefined;
1223
+ throw?: boolean | undefined;
1224
+ auth?: ({
1225
+ type: "Bearer";
1226
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1227
+ } | {
1228
+ type: "Basic";
1229
+ username: string | (() => string | undefined) | undefined;
1230
+ password: string | (() => string | undefined) | undefined;
1231
+ } | {
1232
+ type: "Custom";
1233
+ prefix: string | (() => string | undefined) | undefined;
1234
+ value: string | (() => string | undefined) | undefined;
1235
+ }) | undefined;
1236
+ body?: undefined;
1237
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1238
+ params?: Record<string, any> | undefined;
1239
+ duplex?: "full" | "half" | undefined;
1240
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1241
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1242
+ retryAttempt?: number | undefined;
1243
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1244
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1245
+ disableValidation?: boolean | undefined;
1246
+ }>(data_0?: better_auth_client_plugins0.Prettify<{
1247
+ query?: Record<string, any> | undefined;
1248
+ fetchOptions?: FetchOptions | undefined;
1249
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<better_auth_client_plugins0.Prettify<{
1250
+ id: string;
1251
+ createdAt: Date;
1252
+ updatedAt: Date;
1253
+ userId: string;
1254
+ expiresAt: Date;
1255
+ token: string;
1256
+ ipAddress?: string | null | undefined | undefined;
1257
+ userAgent?: string | null | undefined | undefined;
1258
+ }>[], {
1259
+ code?: string | undefined;
1260
+ message?: string | undefined;
1261
+ }, FetchOptions["throw"] extends true ? true : false>>;
1262
+ } & {
1263
+ revokeSession: <FetchOptions extends {
1264
+ headers?: (HeadersInit & (HeadersInit | {
1265
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1266
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1267
+ authorization: "Bearer" | "Basic";
1268
+ })) | undefined;
1269
+ cache?: RequestCache | undefined;
1270
+ credentials?: RequestCredentials | undefined;
1271
+ integrity?: string | undefined;
1272
+ keepalive?: boolean | undefined;
1273
+ method?: string | undefined;
1274
+ mode?: RequestMode | undefined;
1275
+ priority?: RequestPriority | undefined;
1276
+ redirect?: RequestRedirect | undefined;
1277
+ referrer?: string | undefined;
1278
+ referrerPolicy?: ReferrerPolicy | undefined;
1279
+ signal?: (AbortSignal | null) | undefined;
1280
+ window?: null | undefined;
1281
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1282
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1283
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1284
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1285
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1286
+ hookOptions?: {
1287
+ cloneResponse?: boolean;
1288
+ } | undefined;
1289
+ timeout?: number | undefined;
1290
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1291
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1292
+ baseURL?: string | undefined;
1293
+ throw?: boolean | undefined;
1294
+ auth?: ({
1295
+ type: "Bearer";
1296
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1297
+ } | {
1298
+ type: "Basic";
1299
+ username: string | (() => string | undefined) | undefined;
1300
+ password: string | (() => string | undefined) | undefined;
1301
+ } | {
1302
+ type: "Custom";
1303
+ prefix: string | (() => string | undefined) | undefined;
1304
+ value: string | (() => string | undefined) | undefined;
1305
+ }) | undefined;
1306
+ body?: (Partial<{
1307
+ token: string;
1308
+ }> & Record<string, any>) | undefined;
1309
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1310
+ params?: Record<string, any> | undefined;
1311
+ duplex?: "full" | "half" | undefined;
1312
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1313
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1314
+ retryAttempt?: number | undefined;
1315
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1316
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1317
+ disableValidation?: boolean | undefined;
1318
+ }>(data_0: better_auth_client_plugins0.Prettify<{
1319
+ token: string;
1320
+ } & {
1321
+ fetchOptions?: FetchOptions | undefined;
1322
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1323
+ status: boolean;
1324
+ }, {
1325
+ code?: string | undefined;
1326
+ message?: string | undefined;
1327
+ }, FetchOptions["throw"] extends true ? true : false>>;
1328
+ } & {
1329
+ revokeSessions: <FetchOptions extends {
1330
+ headers?: (HeadersInit & (HeadersInit | {
1331
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1332
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1333
+ authorization: "Bearer" | "Basic";
1334
+ })) | undefined;
1335
+ cache?: RequestCache | undefined;
1336
+ credentials?: RequestCredentials | undefined;
1337
+ integrity?: string | undefined;
1338
+ keepalive?: boolean | undefined;
1339
+ method?: string | undefined;
1340
+ mode?: RequestMode | undefined;
1341
+ priority?: RequestPriority | undefined;
1342
+ redirect?: RequestRedirect | undefined;
1343
+ referrer?: string | undefined;
1344
+ referrerPolicy?: ReferrerPolicy | undefined;
1345
+ signal?: (AbortSignal | null) | undefined;
1346
+ window?: null | undefined;
1347
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1348
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1349
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1350
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1351
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1352
+ hookOptions?: {
1353
+ cloneResponse?: boolean;
1354
+ } | undefined;
1355
+ timeout?: number | undefined;
1356
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1357
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1358
+ baseURL?: string | undefined;
1359
+ throw?: boolean | undefined;
1360
+ auth?: ({
1361
+ type: "Bearer";
1362
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1363
+ } | {
1364
+ type: "Basic";
1365
+ username: string | (() => string | undefined) | undefined;
1366
+ password: string | (() => string | undefined) | undefined;
1367
+ } | {
1368
+ type: "Custom";
1369
+ prefix: string | (() => string | undefined) | undefined;
1370
+ value: string | (() => string | undefined) | undefined;
1371
+ }) | undefined;
1372
+ body?: undefined;
1373
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1374
+ params?: Record<string, any> | undefined;
1375
+ duplex?: "full" | "half" | undefined;
1376
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1377
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1378
+ retryAttempt?: number | undefined;
1379
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1380
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1381
+ disableValidation?: boolean | undefined;
1382
+ }>(data_0?: better_auth_client_plugins0.Prettify<{
1383
+ query?: Record<string, any> | undefined;
1384
+ fetchOptions?: FetchOptions | undefined;
1385
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1386
+ status: boolean;
1387
+ }, {
1388
+ code?: string | undefined;
1389
+ message?: string | undefined;
1390
+ }, FetchOptions["throw"] extends true ? true : false>>;
1391
+ } & {
1392
+ revokeOtherSessions: <FetchOptions extends {
1393
+ headers?: (HeadersInit & (HeadersInit | {
1394
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1395
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1396
+ authorization: "Bearer" | "Basic";
1397
+ })) | undefined;
1398
+ cache?: RequestCache | undefined;
1399
+ credentials?: RequestCredentials | undefined;
1400
+ integrity?: string | undefined;
1401
+ keepalive?: boolean | undefined;
1402
+ method?: string | undefined;
1403
+ mode?: RequestMode | undefined;
1404
+ priority?: RequestPriority | undefined;
1405
+ redirect?: RequestRedirect | undefined;
1406
+ referrer?: string | undefined;
1407
+ referrerPolicy?: ReferrerPolicy | undefined;
1408
+ signal?: (AbortSignal | null) | undefined;
1409
+ window?: null | undefined;
1410
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1411
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1412
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1413
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1414
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1415
+ hookOptions?: {
1416
+ cloneResponse?: boolean;
1417
+ } | undefined;
1418
+ timeout?: number | undefined;
1419
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1420
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1421
+ baseURL?: string | undefined;
1422
+ throw?: boolean | undefined;
1423
+ auth?: ({
1424
+ type: "Bearer";
1425
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1426
+ } | {
1427
+ type: "Basic";
1428
+ username: string | (() => string | undefined) | undefined;
1429
+ password: string | (() => string | undefined) | undefined;
1430
+ } | {
1431
+ type: "Custom";
1432
+ prefix: string | (() => string | undefined) | undefined;
1433
+ value: string | (() => string | undefined) | undefined;
1434
+ }) | undefined;
1435
+ body?: undefined;
1436
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1437
+ params?: Record<string, any> | undefined;
1438
+ duplex?: "full" | "half" | undefined;
1439
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1440
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1441
+ retryAttempt?: number | undefined;
1442
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1443
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1444
+ disableValidation?: boolean | undefined;
1445
+ }>(data_0?: better_auth_client_plugins0.Prettify<{
1446
+ query?: Record<string, any> | undefined;
1447
+ fetchOptions?: FetchOptions | undefined;
1448
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1449
+ status: boolean;
1450
+ }, {
1451
+ code?: string | undefined;
1452
+ message?: string | undefined;
1453
+ }, FetchOptions["throw"] extends true ? true : false>>;
1454
+ } & {
1455
+ linkSocial: <FetchOptions extends {
1456
+ headers?: (HeadersInit & (HeadersInit | {
1457
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1458
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1459
+ authorization: "Bearer" | "Basic";
1460
+ })) | undefined;
1461
+ cache?: RequestCache | undefined;
1462
+ credentials?: RequestCredentials | undefined;
1463
+ integrity?: string | undefined;
1464
+ keepalive?: boolean | undefined;
1465
+ method?: string | undefined;
1466
+ mode?: RequestMode | undefined;
1467
+ priority?: RequestPriority | undefined;
1468
+ redirect?: RequestRedirect | undefined;
1469
+ referrer?: string | undefined;
1470
+ referrerPolicy?: ReferrerPolicy | undefined;
1471
+ signal?: (AbortSignal | null) | undefined;
1472
+ window?: null | undefined;
1473
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1474
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1475
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1476
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1477
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1478
+ hookOptions?: {
1479
+ cloneResponse?: boolean;
1480
+ } | undefined;
1481
+ timeout?: number | undefined;
1482
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1483
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1484
+ baseURL?: string | undefined;
1485
+ throw?: boolean | undefined;
1486
+ auth?: ({
1487
+ type: "Bearer";
1488
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1489
+ } | {
1490
+ type: "Basic";
1491
+ username: string | (() => string | undefined) | undefined;
1492
+ password: string | (() => string | undefined) | undefined;
1493
+ } | {
1494
+ type: "Custom";
1495
+ prefix: string | (() => string | undefined) | undefined;
1496
+ value: string | (() => string | undefined) | undefined;
1497
+ }) | undefined;
1498
+ body?: (Partial<{
1499
+ provider: unknown;
1500
+ callbackURL?: string | undefined;
1501
+ idToken?: {
1502
+ token: string;
1503
+ nonce?: string | undefined;
1504
+ accessToken?: string | undefined;
1505
+ refreshToken?: string | undefined;
1506
+ scopes?: string[] | undefined;
1507
+ } | undefined;
1508
+ requestSignUp?: boolean | undefined;
1509
+ scopes?: string[] | undefined;
1510
+ errorCallbackURL?: string | undefined;
1511
+ disableRedirect?: boolean | undefined;
1512
+ additionalData?: Record<string, any> | undefined;
1513
+ }> & Record<string, any>) | undefined;
1514
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1515
+ params?: Record<string, any> | undefined;
1516
+ duplex?: "full" | "half" | undefined;
1517
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1518
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1519
+ retryAttempt?: number | undefined;
1520
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1521
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1522
+ disableValidation?: boolean | undefined;
1523
+ }>(data_0: better_auth_client_plugins0.Prettify<{
1524
+ provider: unknown;
1525
+ callbackURL?: string | undefined;
1526
+ idToken?: {
1527
+ token: string;
1528
+ nonce?: string | undefined;
1529
+ accessToken?: string | undefined;
1530
+ refreshToken?: string | undefined;
1531
+ scopes?: string[] | undefined;
1532
+ } | undefined;
1533
+ requestSignUp?: boolean | undefined;
1534
+ scopes?: string[] | undefined;
1535
+ errorCallbackURL?: string | undefined;
1536
+ disableRedirect?: boolean | undefined;
1537
+ additionalData?: Record<string, any> | undefined;
1538
+ } & {
1539
+ fetchOptions?: FetchOptions | undefined;
1540
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1541
+ url: string;
1542
+ redirect: boolean;
1543
+ }, {
1544
+ code?: string | undefined;
1545
+ message?: string | undefined;
1546
+ }, FetchOptions["throw"] extends true ? true : false>>;
1547
+ } & {
1548
+ listAccounts: <FetchOptions extends {
1549
+ headers?: (HeadersInit & (HeadersInit | {
1550
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1551
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1552
+ authorization: "Bearer" | "Basic";
1553
+ })) | undefined;
1554
+ cache?: RequestCache | undefined;
1555
+ credentials?: RequestCredentials | undefined;
1556
+ integrity?: string | undefined;
1557
+ keepalive?: boolean | undefined;
1558
+ method?: string | undefined;
1559
+ mode?: RequestMode | undefined;
1560
+ priority?: RequestPriority | undefined;
1561
+ redirect?: RequestRedirect | undefined;
1562
+ referrer?: string | undefined;
1563
+ referrerPolicy?: ReferrerPolicy | undefined;
1564
+ signal?: (AbortSignal | null) | undefined;
1565
+ window?: null | undefined;
1566
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1567
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1568
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1569
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1570
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1571
+ hookOptions?: {
1572
+ cloneResponse?: boolean;
1573
+ } | undefined;
1574
+ timeout?: number | undefined;
1575
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1576
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1577
+ baseURL?: string | undefined;
1578
+ throw?: boolean | undefined;
1579
+ auth?: ({
1580
+ type: "Bearer";
1581
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1582
+ } | {
1583
+ type: "Basic";
1584
+ username: string | (() => string | undefined) | undefined;
1585
+ password: string | (() => string | undefined) | undefined;
1586
+ } | {
1587
+ type: "Custom";
1588
+ prefix: string | (() => string | undefined) | undefined;
1589
+ value: string | (() => string | undefined) | undefined;
1590
+ }) | undefined;
1591
+ body?: undefined;
1592
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1593
+ params?: Record<string, any> | undefined;
1594
+ duplex?: "full" | "half" | undefined;
1595
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1596
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1597
+ retryAttempt?: number | undefined;
1598
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1599
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1600
+ disableValidation?: boolean | undefined;
1601
+ }>(data_0?: better_auth_client_plugins0.Prettify<{
1602
+ query?: Record<string, any> | undefined;
1603
+ fetchOptions?: FetchOptions | undefined;
1604
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1605
+ id: string;
1606
+ providerId: string;
1607
+ createdAt: Date;
1608
+ updatedAt: Date;
1609
+ accountId: string;
1610
+ userId: string;
1611
+ scopes: string[];
1612
+ }[], {
1613
+ code?: string | undefined;
1614
+ message?: string | undefined;
1615
+ }, FetchOptions["throw"] extends true ? true : false>>;
1616
+ } & {
1617
+ deleteUser: {
1618
+ callback: <FetchOptions extends {
1619
+ headers?: (HeadersInit & (HeadersInit | {
1620
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1621
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1622
+ authorization: "Bearer" | "Basic";
1623
+ })) | undefined;
1624
+ cache?: RequestCache | undefined;
1625
+ credentials?: RequestCredentials | undefined;
1626
+ integrity?: string | undefined;
1627
+ keepalive?: boolean | undefined;
1628
+ method?: string | undefined;
1629
+ mode?: RequestMode | undefined;
1630
+ priority?: RequestPriority | undefined;
1631
+ redirect?: RequestRedirect | undefined;
1632
+ referrer?: string | undefined;
1633
+ referrerPolicy?: ReferrerPolicy | undefined;
1634
+ signal?: (AbortSignal | null) | undefined;
1635
+ window?: null | undefined;
1636
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1637
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1638
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1639
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1640
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1641
+ hookOptions?: {
1642
+ cloneResponse?: boolean;
1643
+ } | undefined;
1644
+ timeout?: number | undefined;
1645
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1646
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1647
+ baseURL?: string | undefined;
1648
+ throw?: boolean | undefined;
1649
+ auth?: ({
1650
+ type: "Bearer";
1651
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1652
+ } | {
1653
+ type: "Basic";
1654
+ username: string | (() => string | undefined) | undefined;
1655
+ password: string | (() => string | undefined) | undefined;
1656
+ } | {
1657
+ type: "Custom";
1658
+ prefix: string | (() => string | undefined) | undefined;
1659
+ value: string | (() => string | undefined) | undefined;
1660
+ }) | undefined;
1661
+ body?: undefined;
1662
+ query?: (Partial<{
1663
+ token: string;
1664
+ callbackURL?: string | undefined;
1665
+ }> & Record<string, any>) | undefined;
1666
+ params?: Record<string, any> | undefined;
1667
+ duplex?: "full" | "half" | undefined;
1668
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1669
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1670
+ retryAttempt?: number | undefined;
1671
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1672
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1673
+ disableValidation?: boolean | undefined;
1674
+ }>(data_0: better_auth_client_plugins0.Prettify<{
1675
+ query: {
1676
+ token: string;
1677
+ callbackURL?: string | undefined;
1678
+ };
1679
+ fetchOptions?: FetchOptions | undefined;
1680
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1681
+ success: boolean;
1682
+ message: string;
1683
+ }, {
1684
+ code?: string | undefined;
1685
+ message?: string | undefined;
1686
+ }, FetchOptions["throw"] extends true ? true : false>>;
1687
+ };
1688
+ } & {
1689
+ unlinkAccount: <FetchOptions extends {
1690
+ headers?: (HeadersInit & (HeadersInit | {
1691
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1692
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1693
+ authorization: "Bearer" | "Basic";
1694
+ })) | undefined;
1695
+ cache?: RequestCache | undefined;
1696
+ credentials?: RequestCredentials | undefined;
1697
+ integrity?: string | undefined;
1698
+ keepalive?: boolean | undefined;
1699
+ method?: string | undefined;
1700
+ mode?: RequestMode | undefined;
1701
+ priority?: RequestPriority | undefined;
1702
+ redirect?: RequestRedirect | undefined;
1703
+ referrer?: string | undefined;
1704
+ referrerPolicy?: ReferrerPolicy | undefined;
1705
+ signal?: (AbortSignal | null) | undefined;
1706
+ window?: null | undefined;
1707
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1708
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1709
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1710
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1711
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1712
+ hookOptions?: {
1713
+ cloneResponse?: boolean;
1714
+ } | undefined;
1715
+ timeout?: number | undefined;
1716
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1717
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1718
+ baseURL?: string | undefined;
1719
+ throw?: boolean | undefined;
1720
+ auth?: ({
1721
+ type: "Bearer";
1722
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1723
+ } | {
1724
+ type: "Basic";
1725
+ username: string | (() => string | undefined) | undefined;
1726
+ password: string | (() => string | undefined) | undefined;
1727
+ } | {
1728
+ type: "Custom";
1729
+ prefix: string | (() => string | undefined) | undefined;
1730
+ value: string | (() => string | undefined) | undefined;
1731
+ }) | undefined;
1732
+ body?: (Partial<{
1733
+ providerId: string;
1734
+ accountId?: string | undefined;
1735
+ }> & Record<string, any>) | undefined;
1736
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1737
+ params?: Record<string, any> | undefined;
1738
+ duplex?: "full" | "half" | undefined;
1739
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1740
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1741
+ retryAttempt?: number | undefined;
1742
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1743
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1744
+ disableValidation?: boolean | undefined;
1745
+ }>(data_0: better_auth_client_plugins0.Prettify<{
1746
+ providerId: string;
1747
+ accountId?: string | undefined;
1748
+ } & {
1749
+ fetchOptions?: FetchOptions | undefined;
1750
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1751
+ status: boolean;
1752
+ }, {
1753
+ code?: string | undefined;
1754
+ message?: string | undefined;
1755
+ }, FetchOptions["throw"] extends true ? true : false>>;
1756
+ } & {
1757
+ refreshToken: <FetchOptions extends {
1758
+ headers?: (HeadersInit & (HeadersInit | {
1759
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1760
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1761
+ authorization: "Bearer" | "Basic";
1762
+ })) | undefined;
1763
+ cache?: RequestCache | undefined;
1764
+ credentials?: RequestCredentials | undefined;
1765
+ integrity?: string | undefined;
1766
+ keepalive?: boolean | undefined;
1767
+ method?: string | undefined;
1768
+ mode?: RequestMode | undefined;
1769
+ priority?: RequestPriority | undefined;
1770
+ redirect?: RequestRedirect | undefined;
1771
+ referrer?: string | undefined;
1772
+ referrerPolicy?: ReferrerPolicy | undefined;
1773
+ signal?: (AbortSignal | null) | undefined;
1774
+ window?: null | undefined;
1775
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1776
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1777
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1778
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1779
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1780
+ hookOptions?: {
1781
+ cloneResponse?: boolean;
1782
+ } | undefined;
1783
+ timeout?: number | undefined;
1784
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1785
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1786
+ baseURL?: string | undefined;
1787
+ throw?: boolean | undefined;
1788
+ auth?: ({
1789
+ type: "Bearer";
1790
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1791
+ } | {
1792
+ type: "Basic";
1793
+ username: string | (() => string | undefined) | undefined;
1794
+ password: string | (() => string | undefined) | undefined;
1795
+ } | {
1796
+ type: "Custom";
1797
+ prefix: string | (() => string | undefined) | undefined;
1798
+ value: string | (() => string | undefined) | undefined;
1799
+ }) | undefined;
1800
+ body?: (Partial<{
1801
+ providerId: string;
1802
+ accountId?: string | undefined;
1803
+ userId?: string | undefined;
1804
+ }> & Record<string, any>) | undefined;
1805
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1806
+ params?: Record<string, any> | undefined;
1807
+ duplex?: "full" | "half" | undefined;
1808
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1809
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1810
+ retryAttempt?: number | undefined;
1811
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1812
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1813
+ disableValidation?: boolean | undefined;
1814
+ }>(data_0: better_auth_client_plugins0.Prettify<{
1815
+ providerId: string;
1816
+ accountId?: string | undefined;
1817
+ userId?: string | undefined;
1818
+ } & {
1819
+ fetchOptions?: FetchOptions | undefined;
1820
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<better_auth0.OAuth2Tokens, {
1821
+ code?: string | undefined;
1822
+ message?: string | undefined;
1823
+ }, FetchOptions["throw"] extends true ? true : false>>;
1824
+ } & {
1825
+ getAccessToken: <FetchOptions extends {
1826
+ headers?: (HeadersInit & (HeadersInit | {
1827
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1828
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1829
+ authorization: "Bearer" | "Basic";
1830
+ })) | undefined;
1831
+ cache?: RequestCache | undefined;
1832
+ credentials?: RequestCredentials | undefined;
1833
+ integrity?: string | undefined;
1834
+ keepalive?: boolean | undefined;
1835
+ method?: string | undefined;
1836
+ mode?: RequestMode | undefined;
1837
+ priority?: RequestPriority | undefined;
1838
+ redirect?: RequestRedirect | undefined;
1839
+ referrer?: string | undefined;
1840
+ referrerPolicy?: ReferrerPolicy | undefined;
1841
+ signal?: (AbortSignal | null) | undefined;
1842
+ window?: null | undefined;
1843
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1844
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1845
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1846
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1847
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1848
+ hookOptions?: {
1849
+ cloneResponse?: boolean;
1850
+ } | undefined;
1851
+ timeout?: number | undefined;
1852
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1853
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1854
+ baseURL?: string | undefined;
1855
+ throw?: boolean | undefined;
1856
+ auth?: ({
1857
+ type: "Bearer";
1858
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1859
+ } | {
1860
+ type: "Basic";
1861
+ username: string | (() => string | undefined) | undefined;
1862
+ password: string | (() => string | undefined) | undefined;
1863
+ } | {
1864
+ type: "Custom";
1865
+ prefix: string | (() => string | undefined) | undefined;
1866
+ value: string | (() => string | undefined) | undefined;
1867
+ }) | undefined;
1868
+ body?: (Partial<{
1869
+ providerId: string;
1870
+ accountId?: string | undefined;
1871
+ userId?: string | undefined;
1872
+ }> & Record<string, any>) | undefined;
1873
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1874
+ params?: Record<string, any> | undefined;
1875
+ duplex?: "full" | "half" | undefined;
1876
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1877
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1878
+ retryAttempt?: number | undefined;
1879
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1880
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1881
+ disableValidation?: boolean | undefined;
1882
+ }>(data_0: better_auth_client_plugins0.Prettify<{
1883
+ providerId: string;
1884
+ accountId?: string | undefined;
1885
+ userId?: string | undefined;
1886
+ } & {
1887
+ fetchOptions?: FetchOptions | undefined;
1888
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1889
+ accessToken: string;
1890
+ accessTokenExpiresAt: Date | undefined;
1891
+ scopes: string[];
1892
+ idToken: string | undefined;
1893
+ }, {
1894
+ code?: string | undefined;
1895
+ message?: string | undefined;
1896
+ }, FetchOptions["throw"] extends true ? true : false>>;
1897
+ } & {
1898
+ accountInfo: <FetchOptions extends {
1899
+ headers?: (HeadersInit & (HeadersInit | {
1900
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1901
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1902
+ authorization: "Bearer" | "Basic";
1903
+ })) | undefined;
1904
+ cache?: RequestCache | undefined;
1905
+ credentials?: RequestCredentials | undefined;
1906
+ integrity?: string | undefined;
1907
+ keepalive?: boolean | undefined;
1908
+ method?: string | undefined;
1909
+ mode?: RequestMode | undefined;
1910
+ priority?: RequestPriority | undefined;
1911
+ redirect?: RequestRedirect | undefined;
1912
+ referrer?: string | undefined;
1913
+ referrerPolicy?: ReferrerPolicy | undefined;
1914
+ signal?: (AbortSignal | null) | undefined;
1915
+ window?: null | undefined;
1916
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1917
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1918
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1919
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1920
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1921
+ hookOptions?: {
1922
+ cloneResponse?: boolean;
1923
+ } | undefined;
1924
+ timeout?: number | undefined;
1925
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1926
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1927
+ baseURL?: string | undefined;
1928
+ throw?: boolean | undefined;
1929
+ auth?: ({
1930
+ type: "Bearer";
1931
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1932
+ } | {
1933
+ type: "Basic";
1934
+ username: string | (() => string | undefined) | undefined;
1935
+ password: string | (() => string | undefined) | undefined;
1936
+ } | {
1937
+ type: "Custom";
1938
+ prefix: string | (() => string | undefined) | undefined;
1939
+ value: string | (() => string | undefined) | undefined;
1940
+ }) | undefined;
1941
+ body?: (Partial<{
1942
+ accountId: string;
1943
+ }> & Record<string, any>) | undefined;
1944
+ query?: (Partial<Record<string, any>> & Record<string, any>) | undefined;
1945
+ params?: Record<string, any> | undefined;
1946
+ duplex?: "full" | "half" | undefined;
1947
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
1948
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
1949
+ retryAttempt?: number | undefined;
1950
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
1951
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
1952
+ disableValidation?: boolean | undefined;
1953
+ }>(data_0: better_auth_client_plugins0.Prettify<{
1954
+ accountId: string;
1955
+ } & {
1956
+ fetchOptions?: FetchOptions | undefined;
1957
+ }>, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
1958
+ user: better_auth0.OAuth2UserInfo;
1959
+ data: Record<string, any>;
1960
+ }, {
1961
+ code?: string | undefined;
1962
+ message?: string | undefined;
1963
+ }, FetchOptions["throw"] extends true ? true : false>>;
1964
+ } & {
1965
+ getSession: <FetchOptions extends {
1966
+ headers?: (HeadersInit & (HeadersInit | {
1967
+ accept: "application/json" | "text/plain" | "application/octet-stream";
1968
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
1969
+ authorization: "Bearer" | "Basic";
1970
+ })) | undefined;
1971
+ cache?: RequestCache | undefined;
1972
+ credentials?: RequestCredentials | undefined;
1973
+ integrity?: string | undefined;
1974
+ keepalive?: boolean | undefined;
1975
+ method?: string | undefined;
1976
+ mode?: RequestMode | undefined;
1977
+ priority?: RequestPriority | undefined;
1978
+ redirect?: RequestRedirect | undefined;
1979
+ referrer?: string | undefined;
1980
+ referrerPolicy?: ReferrerPolicy | undefined;
1981
+ signal?: (AbortSignal | null) | undefined;
1982
+ window?: null | undefined;
1983
+ onRequest?: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
1984
+ onResponse?: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
1985
+ onSuccess?: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
1986
+ onError?: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
1987
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
1988
+ hookOptions?: {
1989
+ cloneResponse?: boolean;
1990
+ } | undefined;
1991
+ timeout?: number | undefined;
1992
+ customFetchImpl?: _better_fetch_fetch0.FetchEsque | undefined;
1993
+ plugins?: _better_fetch_fetch0.BetterFetchPlugin[] | undefined;
1994
+ baseURL?: string | undefined;
1995
+ throw?: boolean | undefined;
1996
+ auth?: ({
1997
+ type: "Bearer";
1998
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
1999
+ } | {
2000
+ type: "Basic";
2001
+ username: string | (() => string | undefined) | undefined;
2002
+ password: string | (() => string | undefined) | undefined;
2003
+ } | {
2004
+ type: "Custom";
2005
+ prefix: string | (() => string | undefined) | undefined;
2006
+ value: string | (() => string | undefined) | undefined;
2007
+ }) | undefined;
2008
+ body?: undefined;
2009
+ query?: (Partial<{
2010
+ disableCookieCache?: unknown;
2011
+ disableRefresh?: unknown;
2012
+ }> & Record<string, any>) | undefined;
2013
+ params?: Record<string, any> | undefined;
2014
+ duplex?: "full" | "half" | undefined;
2015
+ jsonParser?: ((text: string) => Promise<any> | any) | undefined;
2016
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
2017
+ retryAttempt?: number | undefined;
2018
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2019
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
2020
+ disableValidation?: boolean | undefined;
2021
+ }>(data_0?: better_auth_client_plugins0.Prettify<{
2022
+ query?: {
2023
+ disableCookieCache?: unknown;
2024
+ disableRefresh?: unknown;
2025
+ } | undefined;
2026
+ fetchOptions?: FetchOptions | undefined;
2027
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<_better_fetch_fetch0.BetterFetchResponse<{
2028
+ user: {
2029
+ id: string;
2030
+ createdAt: Date;
2031
+ updatedAt: Date;
2032
+ email: string;
2033
+ emailVerified: boolean;
2034
+ name: string;
2035
+ image?: string | null | undefined;
2036
+ };
2037
+ session: {
2038
+ id: string;
2039
+ createdAt: Date;
2040
+ updatedAt: Date;
2041
+ userId: string;
2042
+ expiresAt: Date;
2043
+ token: string;
2044
+ ipAddress?: string | null | undefined;
2045
+ userAgent?: string | null | undefined;
2046
+ };
2047
+ } | null, {
2048
+ code?: string | undefined;
2049
+ message?: string | undefined;
2050
+ }, FetchOptions["throw"] extends true ? true : false>>;
2051
+ } & {
2052
+ useSession: () => {
2053
+ data: {
2054
+ user: {
2055
+ id: string;
2056
+ createdAt: Date;
2057
+ updatedAt: Date;
2058
+ email: string;
2059
+ emailVerified: boolean;
2060
+ name: string;
2061
+ image?: string | null | undefined;
2062
+ };
2063
+ session: {
2064
+ id: string;
2065
+ createdAt: Date;
2066
+ updatedAt: Date;
2067
+ userId: string;
2068
+ expiresAt: Date;
2069
+ token: string;
2070
+ ipAddress?: string | null | undefined;
2071
+ userAgent?: string | null | undefined;
2072
+ };
2073
+ } | null;
2074
+ isPending: boolean;
2075
+ isRefetching: boolean;
2076
+ error: _better_fetch_fetch0.BetterFetchError | null;
2077
+ refetch: (queryParams?: {
2078
+ query?: better_auth0.SessionQueryParams;
2079
+ } | undefined) => void;
2080
+ };
2081
+ $Infer: {
2082
+ Session: {
2083
+ user: {
2084
+ id: string;
2085
+ createdAt: Date;
2086
+ updatedAt: Date;
2087
+ email: string;
2088
+ emailVerified: boolean;
2089
+ name: string;
2090
+ image?: string | null | undefined;
2091
+ };
2092
+ session: {
2093
+ id: string;
2094
+ createdAt: Date;
2095
+ updatedAt: Date;
2096
+ userId: string;
2097
+ expiresAt: Date;
2098
+ token: string;
2099
+ ipAddress?: string | null | undefined;
2100
+ userAgent?: string | null | undefined;
2101
+ };
2102
+ };
2103
+ };
2104
+ $fetch: _better_fetch_fetch0.BetterFetch<{
2105
+ plugins: (_better_fetch_fetch0.BetterFetchPlugin | {
2106
+ id: string;
2107
+ name: string;
2108
+ hooks: {
2109
+ onSuccess(context: _better_fetch_fetch0.SuccessContext<any>): void;
2110
+ };
2111
+ } | {
2112
+ id: string;
2113
+ name: string;
2114
+ hooks: {
2115
+ onRequest<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>): void;
2116
+ };
2117
+ } | {
2118
+ id: string;
2119
+ name: string;
2120
+ hooks: {
2121
+ onSuccess: ((context: _better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
2122
+ onError: ((context: _better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
2123
+ onRequest: (<T$1 extends Record<string, any>>(context: _better_fetch_fetch0.RequestContext<T$1>) => Promise<_better_fetch_fetch0.RequestContext | void> | _better_fetch_fetch0.RequestContext | void) | undefined;
2124
+ onResponse: ((context: _better_fetch_fetch0.ResponseContext) => Promise<Response | void | _better_fetch_fetch0.ResponseContext> | Response | _better_fetch_fetch0.ResponseContext | void) | undefined;
2125
+ };
2126
+ })[];
2127
+ method: string;
2128
+ headers?: (HeadersInit & (HeadersInit | {
2129
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2130
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2131
+ authorization: "Bearer" | "Basic";
2132
+ })) | undefined;
2133
+ redirect?: RequestRedirect | undefined;
2134
+ cache?: RequestCache | undefined;
2135
+ credentials?: RequestCredentials;
2136
+ integrity?: string | undefined;
2137
+ keepalive?: boolean | undefined;
2138
+ mode?: RequestMode | undefined;
2139
+ priority?: RequestPriority | undefined;
2140
+ referrer?: string | undefined;
2141
+ referrerPolicy?: ReferrerPolicy | undefined;
2142
+ signal?: (AbortSignal | null) | undefined;
2143
+ window?: null | undefined;
2144
+ onRetry?: ((response: _better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
2145
+ hookOptions?: {
2146
+ cloneResponse?: boolean;
2147
+ } | undefined;
2148
+ timeout?: number | undefined;
2149
+ customFetchImpl: _better_fetch_fetch0.FetchEsque;
2150
+ baseURL: string;
2151
+ throw?: boolean | undefined;
2152
+ auth?: ({
2153
+ type: "Bearer";
2154
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2155
+ } | {
2156
+ type: "Basic";
2157
+ username: string | (() => string | undefined) | undefined;
2158
+ password: string | (() => string | undefined) | undefined;
2159
+ } | {
2160
+ type: "Custom";
2161
+ prefix: string | (() => string | undefined) | undefined;
2162
+ value: string | (() => string | undefined) | undefined;
2163
+ }) | undefined;
2164
+ body?: any;
2165
+ query?: any;
2166
+ params?: any;
2167
+ duplex?: "full" | "half" | undefined;
2168
+ jsonParser: (text: string) => Promise<any> | any;
2169
+ retry?: _better_fetch_fetch0.RetryOptions | undefined;
2170
+ retryAttempt?: number | undefined;
2171
+ output?: (_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2172
+ errorSchema?: _better_fetch_fetch0.StandardSchemaV1 | undefined;
2173
+ disableValidation?: boolean | undefined;
2174
+ }, unknown, unknown, {}>;
2175
+ $store: {
2176
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
2177
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
2178
+ atoms: Record<string, nanostores0.WritableAtom<any>>;
2179
+ };
2180
+ $ERROR_CODES: {
2181
+ readonly USER_NOT_FOUND: "User not found";
2182
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
2183
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
2184
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
2185
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
2186
+ readonly INVALID_PASSWORD: "Invalid password";
2187
+ readonly INVALID_EMAIL: "Invalid email";
2188
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
2189
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
2190
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
2191
+ readonly INVALID_TOKEN: "Invalid token";
2192
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
2193
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
2194
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
2195
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
2196
+ readonly PASSWORD_TOO_SHORT: "Password too short";
2197
+ readonly PASSWORD_TOO_LONG: "Password too long";
2198
+ readonly USER_ALREADY_EXISTS: "User already exists.";
2199
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2200
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
2201
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
2202
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
2203
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
2204
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
2205
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
2206
+ };
2207
+ };
2208
+ /**
2209
+ * The type of the authentication client.
2210
+ */
2211
+ type AuthClient = ReturnType<typeof defineAuthClient>;
2212
+ //#endregion
2213
+ //#region app/lib/auth-provider.d.ts
2214
+ /**
2215
+ * The context type for authentication.
2216
+ */
2217
+ type AuthContextType = {
2218
+ /**
2219
+ * The authentication client instance.
2220
+ */
2221
+ client: AuthClient;
2222
+ /**
2223
+ * The UI feature flags for authentication.
2224
+ */
2225
+ features: AuthUIFeatures;
2226
+ };
2227
+ /**
2228
+ * Hook to access the auth context. Provides access to the auth client and
2229
+ * feature flags.
2230
+ */
2231
+ declare function useAuth(): AuthContextType;
2232
+ //#endregion
2233
+ //#region app/lib/realtime.d.ts
2234
+ /**
2235
+ * Type-safe Socket.IO client.
2236
+ */
2237
+ type TypedRealtime = Socket<ServerToClientEvents, ClientToServerEvents>;
2238
+ /**
2239
+ * The realtime provider component.
2240
+ */
2241
+
2242
+ /**
2243
+ * Hook to access the Socket.IO client.
2244
+ *
2245
+ * @example
2246
+ * ```tsx
2247
+ * function MyComponent() {
2248
+ * const realtime = useRealtime();
2249
+ *
2250
+ * useEffect(() => {
2251
+ * if (!realtime) return;
2252
+ *
2253
+ * realtime.on('notification:new', (data) => {
2254
+ * console.log('New notification:', data);
2255
+ * });
2256
+ *
2257
+ * return () => {
2258
+ * realtime.off('notification:new');
2259
+ * };
2260
+ * }, [realtime]);
2261
+ *
2262
+ * return <div>...</div>;
2263
+ * }
2264
+ * ```
2265
+ */
2266
+ declare function useRealtime(): TypedRealtime;
2267
+ /**
2268
+ * Optional hook that returns null if not within RealtimeProvider.
2269
+ */
2270
+ declare function useSocketOptional(): TypedRealtime | null;
2271
+ //#endregion
2272
+ export { type AuthContextType, type FileMetadata, type FileUploadActions, type FileUploadOptions, type FileUploadState, type FileWithPreview, UPLOAD_PRESETS, UPLOAD_VALIDATION, type UploadPreset, formatBytes, generateAcceptAttribute, getFileIcon, getFilePreview, isValidContentType, isValidFileExtension, useAuth, useEnv, useFileUpload, useRealtime, useSocketOptional, validateUpload };