appos 0.2.1 → 0.2.2-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/dist/bin/auth-schema-7KeUwlcd.mjs +2 -0
  2. package/dist/bin/concurrently.mjs +2 -0
  3. package/dist/bin/event-v2sCJkNd.mjs +2 -0
  4. package/dist/bin/extract-blob-metadata-TqNd9w-6.mjs +2 -0
  5. package/dist/bin/generate-image-variant-D8H9FxgD.mjs +2 -0
  6. package/dist/bin/generate-preview-5jLZLX6I.mjs +2 -0
  7. package/dist/bin/main.mjs +362 -0
  8. package/dist/bin/purge-attachment-CMlJMNOk.mjs +2 -0
  9. package/dist/bin/purge-audit-logs-hd6q6vnR.mjs +2 -0
  10. package/dist/bin/purge-unattached-blobs-BYv5b9R9.mjs +2 -0
  11. package/dist/bin/track-db-changes-q0Vl7Htm.mjs +2 -0
  12. package/dist/bin/vite.mjs +2 -0
  13. package/dist/bin/vitest.mjs +2 -0
  14. package/dist/bin/workflow-BagSlsMp.mjs +2 -0
  15. package/dist/bin/youch-handler-Jj6i1XIT.mjs +2 -0
  16. package/dist/exports/api/_virtual/rolldown_runtime.mjs +1 -0
  17. package/dist/exports/api/app-context.d.mts +115 -0
  18. package/dist/exports/api/app-context.mjs +1 -0
  19. package/dist/exports/api/auth-schema.d.mts +4248 -0
  20. package/dist/exports/api/auth-schema.mjs +1 -0
  21. package/dist/exports/api/auth.d.mts +398 -0
  22. package/dist/exports/api/auth.mjs +1 -0
  23. package/dist/exports/api/cache.d.mts +44 -0
  24. package/dist/exports/api/cache.mjs +1 -0
  25. package/dist/exports/api/config.d.mts +28 -0
  26. package/dist/exports/api/config.mjs +1 -0
  27. package/dist/exports/api/container.d.mts +210 -0
  28. package/dist/exports/api/container.mjs +1 -0
  29. package/dist/exports/api/database.d.mts +99 -0
  30. package/dist/exports/api/database.mjs +1 -0
  31. package/dist/exports/api/event.d.mts +235 -0
  32. package/dist/exports/api/event.mjs +1 -0
  33. package/dist/exports/api/i18n.d.mts +34 -0
  34. package/dist/exports/api/i18n.mjs +1 -0
  35. package/dist/exports/api/index.d.mts +21 -0
  36. package/dist/exports/api/index.mjs +1 -0
  37. package/dist/exports/api/logger.d.mts +21 -0
  38. package/dist/exports/api/logger.mjs +1 -0
  39. package/dist/exports/api/mailer.d.mts +70 -0
  40. package/dist/exports/api/mailer.mjs +1 -0
  41. package/dist/exports/api/middleware/request-logger.d.mts +24 -0
  42. package/dist/exports/api/middleware.d.mts +39 -0
  43. package/dist/exports/api/middleware.mjs +1 -0
  44. package/dist/exports/api/node_modules/.bun/change-case@5.4.4/node_modules/change-case/dist/index.mjs +1 -0
  45. package/dist/exports/api/openapi.d.mts +271 -0
  46. package/dist/exports/api/openapi.mjs +1 -0
  47. package/dist/exports/api/orm.d.mts +13 -0
  48. package/dist/exports/api/orm.mjs +1 -0
  49. package/dist/exports/api/otel.d.mts +40 -0
  50. package/dist/exports/api/otel.mjs +1 -0
  51. package/dist/exports/api/packages/appos/src/constants.mjs +1 -0
  52. package/dist/exports/api/packages/appos/src/instrumentation.d.mts +7 -0
  53. package/dist/exports/api/packages/appos/src/instrumentation.mjs +1 -0
  54. package/dist/exports/api/packages/appos/src/web/auth.mjs +1 -0
  55. package/dist/exports/api/redis.d.mts +34 -0
  56. package/dist/exports/api/redis.mjs +1 -0
  57. package/dist/exports/api/storage-schema.d.mts +707 -0
  58. package/dist/exports/api/storage-schema.mjs +1 -0
  59. package/dist/exports/api/storage.d.mts +506 -0
  60. package/dist/exports/api/storage.mjs +1 -0
  61. package/dist/exports/api/workflow.d.mts +250 -0
  62. package/dist/exports/api/workflow.mjs +1 -0
  63. package/dist/exports/api/workflows/_virtual/rolldown_runtime.mjs +1 -0
  64. package/dist/exports/api/workflows/auth-schema.mjs +1 -0
  65. package/dist/exports/api/workflows/auth.d.mts +375 -0
  66. package/dist/exports/api/workflows/cache.d.mts +44 -0
  67. package/dist/exports/api/workflows/config.d.mts +18 -0
  68. package/dist/exports/api/workflows/container.d.mts +167 -0
  69. package/dist/exports/api/workflows/database.d.mts +46 -0
  70. package/dist/exports/api/workflows/event.d.mts +68 -0
  71. package/dist/exports/api/workflows/event.mjs +1 -0
  72. package/dist/exports/api/workflows/extract-blob-metadata.mjs +1 -0
  73. package/dist/exports/api/workflows/generate-image-variant.d.mts +99 -0
  74. package/dist/exports/api/workflows/generate-image-variant.mjs +1 -0
  75. package/dist/exports/api/workflows/generate-preview.mjs +1 -0
  76. package/dist/exports/api/workflows/index.d.mts +2 -0
  77. package/dist/exports/api/workflows/index.mjs +1 -0
  78. package/dist/exports/api/workflows/logger.d.mts +21 -0
  79. package/dist/exports/api/workflows/mailer.d.mts +70 -0
  80. package/dist/exports/api/workflows/orm.d.mts +13 -0
  81. package/dist/exports/api/workflows/purge-attachment.mjs +1 -0
  82. package/dist/exports/api/workflows/purge-audit-logs.mjs +1 -0
  83. package/dist/exports/api/workflows/purge-unattached-blobs.mjs +1 -0
  84. package/dist/exports/api/workflows/redis.mjs +1 -0
  85. package/dist/exports/api/workflows/storage-schema.d.mts +699 -0
  86. package/dist/exports/api/workflows/storage.d.mts +396 -0
  87. package/dist/exports/api/workflows/track-db-changes.d.mts +72 -0
  88. package/dist/exports/api/workflows/track-db-changes.mjs +1 -0
  89. package/dist/exports/api/workflows/workflow.d.mts +24 -0
  90. package/dist/exports/api/workflows/workflow.mjs +1 -0
  91. package/dist/exports/cli/_virtual/rolldown_runtime.mjs +1 -0
  92. package/dist/exports/cli/api/auth-schema.mjs +1 -0
  93. package/dist/exports/cli/api/auth.d.mts +375 -0
  94. package/dist/exports/cli/api/cache.d.mts +44 -0
  95. package/dist/exports/cli/api/config.d.mts +18 -0
  96. package/dist/exports/cli/api/container.d.mts +167 -0
  97. package/dist/exports/cli/api/database.d.mts +46 -0
  98. package/dist/exports/cli/api/event.d.mts +68 -0
  99. package/dist/exports/cli/api/event.mjs +1 -0
  100. package/dist/exports/cli/api/logger.d.mts +21 -0
  101. package/dist/exports/cli/api/mailer.d.mts +70 -0
  102. package/dist/exports/cli/api/orm.d.mts +13 -0
  103. package/dist/exports/cli/api/redis.mjs +1 -0
  104. package/dist/exports/cli/api/storage-schema.d.mts +699 -0
  105. package/dist/exports/cli/api/storage.d.mts +396 -0
  106. package/dist/exports/cli/api/workflow.d.mts +2 -0
  107. package/dist/exports/cli/api/workflow.mjs +1 -0
  108. package/dist/exports/cli/api/workflows/extract-blob-metadata.mjs +1 -0
  109. package/dist/exports/cli/api/workflows/generate-image-variant.d.mts +63 -0
  110. package/dist/exports/cli/api/workflows/generate-image-variant.mjs +1 -0
  111. package/dist/exports/cli/api/workflows/generate-preview.mjs +1 -0
  112. package/dist/exports/cli/api/workflows/purge-attachment.mjs +1 -0
  113. package/dist/exports/cli/api/workflows/purge-audit-logs.mjs +1 -0
  114. package/dist/exports/cli/api/workflows/purge-unattached-blobs.mjs +1 -0
  115. package/dist/exports/cli/api/workflows/track-db-changes.mjs +1 -0
  116. package/dist/exports/cli/command.d.mts +54 -0
  117. package/dist/exports/cli/command.mjs +1 -0
  118. package/dist/exports/cli/context.d.mts +170 -0
  119. package/dist/exports/cli/index.d.mts +3 -0
  120. package/dist/exports/cli/index.mjs +1 -0
  121. package/dist/exports/devtools/index.d.ts +3 -0
  122. package/dist/exports/devtools/index.js +1 -0
  123. package/dist/exports/instrumentation.d.mts +1 -0
  124. package/dist/exports/instrumentation.mjs +1 -0
  125. package/dist/exports/tests/_virtual/rolldown_runtime.mjs +1 -0
  126. package/dist/exports/tests/api.d.mts +86 -0
  127. package/dist/exports/tests/api.mjs +1 -0
  128. package/dist/exports/tests/mock.d.mts +1 -0
  129. package/dist/exports/tests/mock.mjs +1 -0
  130. package/dist/exports/tests/node_modules/.bun/change-case@5.4.4/node_modules/change-case/dist/index.mjs +1 -0
  131. package/dist/exports/tests/node_modules/.bun/rate-limit-redis@4.3.1_f1fa5524233c9c60/node_modules/rate-limit-redis/dist/index.mjs +25 -0
  132. package/dist/exports/tests/packages/appos/src/api/app-context.d.mts +115 -0
  133. package/dist/exports/tests/packages/appos/src/api/auth-schema.d.mts +4248 -0
  134. package/dist/exports/tests/packages/appos/src/api/auth-schema.mjs +1 -0
  135. package/dist/exports/tests/packages/appos/src/api/auth.d.mts +398 -0
  136. package/dist/exports/tests/packages/appos/src/api/cache.d.mts +44 -0
  137. package/dist/exports/tests/packages/appos/src/api/config.d.mts +28 -0
  138. package/dist/exports/tests/packages/appos/src/api/container.d.mts +210 -0
  139. package/dist/exports/tests/packages/appos/src/api/database.d.mts +99 -0
  140. package/dist/exports/tests/packages/appos/src/api/database.mjs +1 -0
  141. package/dist/exports/tests/packages/appos/src/api/event.d.mts +235 -0
  142. package/dist/exports/tests/packages/appos/src/api/event.mjs +1 -0
  143. package/dist/exports/tests/packages/appos/src/api/i18n.d.mts +34 -0
  144. package/dist/exports/tests/packages/appos/src/api/index.d.mts +27 -0
  145. package/dist/exports/tests/packages/appos/src/api/logger.d.mts +21 -0
  146. package/dist/exports/tests/packages/appos/src/api/mailer.d.mts +70 -0
  147. package/dist/exports/tests/packages/appos/src/api/middleware/error-handler.mjs +1 -0
  148. package/dist/exports/tests/packages/appos/src/api/middleware/health.mjs +1 -0
  149. package/dist/exports/tests/packages/appos/src/api/middleware/i18n.mjs +1 -0
  150. package/dist/exports/tests/packages/appos/src/api/middleware/request-logger.d.mts +24 -0
  151. package/dist/exports/tests/packages/appos/src/api/middleware/request-logger.mjs +1 -0
  152. package/dist/exports/tests/packages/appos/src/api/middleware/shutdown.mjs +1 -0
  153. package/dist/exports/tests/packages/appos/src/api/middleware/timeout.mjs +1 -0
  154. package/dist/exports/tests/packages/appos/src/api/middleware/youch-handler.mjs +1 -0
  155. package/dist/exports/tests/packages/appos/src/api/middleware.d.mts +39 -0
  156. package/dist/exports/tests/packages/appos/src/api/middleware.mjs +1 -0
  157. package/dist/exports/tests/packages/appos/src/api/openapi.d.mts +271 -0
  158. package/dist/exports/tests/packages/appos/src/api/orm.d.mts +13 -0
  159. package/dist/exports/tests/packages/appos/src/api/otel.d.mts +40 -0
  160. package/dist/exports/tests/packages/appos/src/api/redis.d.mts +34 -0
  161. package/dist/exports/tests/packages/appos/src/api/redis.mjs +1 -0
  162. package/dist/exports/tests/packages/appos/src/api/server.mjs +1 -0
  163. package/dist/exports/tests/packages/appos/src/api/storage-schema.d.mts +707 -0
  164. package/dist/exports/tests/packages/appos/src/api/storage.d.mts +506 -0
  165. package/dist/exports/tests/packages/appos/src/api/workflow.d.mts +250 -0
  166. package/dist/exports/tests/packages/appos/src/api/workflow.mjs +1 -0
  167. package/dist/exports/tests/packages/appos/src/api/workflows/extract-blob-metadata.mjs +1 -0
  168. package/dist/exports/tests/packages/appos/src/api/workflows/generate-image-variant.d.mts +99 -0
  169. package/dist/exports/tests/packages/appos/src/api/workflows/generate-image-variant.mjs +1 -0
  170. package/dist/exports/tests/packages/appos/src/api/workflows/generate-preview.mjs +1 -0
  171. package/dist/exports/tests/packages/appos/src/api/workflows/purge-attachment.mjs +1 -0
  172. package/dist/exports/tests/packages/appos/src/api/workflows/purge-audit-logs.mjs +1 -0
  173. package/dist/exports/tests/packages/appos/src/api/workflows/purge-unattached-blobs.mjs +1 -0
  174. package/dist/exports/tests/packages/appos/src/api/workflows/track-db-changes.mjs +1 -0
  175. package/dist/exports/tests/packages/appos/src/constants.mjs +1 -0
  176. package/dist/exports/tests/packages/appos/src/instrumentation.d.mts +7 -0
  177. package/dist/exports/tests/packages/appos/src/instrumentation.mjs +1 -0
  178. package/dist/exports/tests/react.d.mts +2 -0
  179. package/dist/exports/tests/react.mjs +1 -0
  180. package/dist/exports/tests/setup.d.mts +1 -0
  181. package/dist/exports/tests/setup.mjs +1 -0
  182. package/dist/exports/vendors/date.js +1 -0
  183. package/dist/exports/vendors/toolkit.js +1 -0
  184. package/dist/exports/vendors/zod.d.ts +1 -0
  185. package/dist/exports/vendors/zod.js +1 -0
  186. package/dist/exports/vite/index.d.mts +19 -0
  187. package/dist/exports/vite/index.mjs +1 -0
  188. package/dist/exports/vitest/config.d.mts +1 -0
  189. package/dist/exports/vitest/config.mjs +1 -0
  190. package/dist/exports/vitest/globals.d.mts +1 -0
  191. package/dist/exports/vitest/globals.mjs +1 -0
  192. package/dist/exports/vitest/index.d.mts +1 -0
  193. package/dist/exports/vitest/index.mjs +1 -0
  194. package/dist/exports/web/api/auth.d.ts +125 -0
  195. package/dist/exports/web/api/database.d.ts +4 -0
  196. package/dist/exports/web/api/logger.d.ts +1 -0
  197. package/dist/exports/web/auth.d.ts +2388 -0
  198. package/dist/exports/web/auth.js +1 -0
  199. package/dist/exports/web/i18n.d.ts +42 -0
  200. package/dist/exports/web/i18n.js +1 -0
  201. package/dist/exports/web/index.d.ts +6 -0
  202. package/dist/exports/web/index.js +1 -0
  203. package/package.json +138 -98
  204. package/build/bin/main.mjs +0 -2
  205. package/build/exports/cli/index.d.mts +0 -325
  206. package/build/exports/cli/index.mjs +0 -1
  207. package/build/exports/instrumentation/execAsync-DaIUcs6_.mjs +0 -1
  208. package/build/exports/instrumentation/getMachineId-bsd-bB6ipDhm.mjs +0 -1
  209. package/build/exports/instrumentation/getMachineId-darwin-D1Bx5aCe.mjs +0 -2
  210. package/build/exports/instrumentation/getMachineId-linux-D_R9Tla0.mjs +0 -1
  211. package/build/exports/instrumentation/getMachineId-unsupported-BZKPE_Ev.mjs +0 -1
  212. package/build/exports/instrumentation/getMachineId-win-CmPvIqHL.mjs +0 -1
  213. package/build/exports/instrumentation/instrumentation.d.mts +0 -1
  214. package/build/exports/instrumentation/instrumentation.mjs +0 -80
  215. package/build/exports/server/index.d.mts +0 -327
  216. package/build/exports/server/index.mjs +0 -219
  217. package/build/exports/server/react-gPO8Jsy-.mjs +0 -13
  218. package/build/exports/server/server.node-D_9RYjm9.mjs +0 -210
  219. package/build/exports/store/index.d.mts +0 -58
  220. package/build/exports/store/index.mjs +0 -15
  221. package/build/exports/support/datetime.js +0 -1
  222. package/build/exports/support/utils.js +0 -1
  223. package/build/exports/support/zod.d.ts +0 -2
  224. package/build/exports/support/zod.js +0 -23
  225. package/build/exports/test/dist-DAsoCGWk.mjs +0 -348
  226. package/build/exports/test/index.d.mts +0 -3
  227. package/build/exports/test/index.mjs +0 -1
  228. package/build/exports/test/magic-string.es-BWgiB2kd.mjs +0 -14
  229. package/build/exports/test/setup.d.mts +0 -1
  230. package/build/exports/test/setup.mjs +0 -329
  231. /package/{build/exports/support/datetime.d.ts → dist/exports/vendors/date.d.ts} +0 -0
  232. /package/{build/exports/support/utils.d.ts → dist/exports/vendors/toolkit.d.ts} +0 -0
@@ -0,0 +1,2388 @@
1
+ import { AuthConfig } from "./api/auth.js";
2
+ import * as _better_auth_passkey_client0 from "@better-auth/passkey/client";
3
+ import * as better_auth_react0 from "better-auth/react";
4
+ import * as _better_auth_passkey0 from "@better-auth/passkey";
5
+ import * as better_auth0 from "better-auth";
6
+ import * as better_auth_plugins0 from "better-auth/plugins";
7
+ import * as _better_auth_sso0 from "@better-auth/sso";
8
+
9
+ //#region src/web/auth.d.ts
10
+ /**
11
+ * Default base path for auth routes.
12
+ */
13
+ declare const AUTH_BASE_PATH: "/auth";
14
+ /**
15
+ * Default base URL (empty - same origin).
16
+ */
17
+ declare const AUTH_BASE_URL: "";
18
+ /**
19
+ * Derived features object for UI component decisions.
20
+ * This is a runtime object derived from config.
21
+ */
22
+ interface AuthFeatures {
23
+ emailPassword: boolean;
24
+ magicLink: boolean;
25
+ passkey: boolean;
26
+ phoneOtp: boolean;
27
+ emailOtp: boolean;
28
+ oauth: {
29
+ google: boolean;
30
+ github: boolean;
31
+ apple: boolean;
32
+ facebook: boolean;
33
+ };
34
+ twoFactor: {
35
+ enabled: boolean;
36
+ totp: boolean;
37
+ otp: boolean;
38
+ backupCodes: boolean;
39
+ };
40
+ multiSession: boolean;
41
+ username: boolean;
42
+ anonymous: boolean;
43
+ sso: boolean;
44
+ }
45
+ /**
46
+ * Derives features from config at runtime.
47
+ * Uses presence-based detection - if key exists, feature is enabled.
48
+ */
49
+ declare function defineAuthFeatures<T extends AuthConfig>(config: T): AuthFeatures;
50
+ /**
51
+ * Client-specific plugin options.
52
+ * Only for options that are client-only (not shared in config).
53
+ */
54
+ interface ClientPluginOptions {
55
+ /** Two-factor plugin client options */
56
+ twoFactor?: {
57
+ /** Callback invoked when 2FA verification is required */
58
+ onTwoFactorRedirect?: () => void;
59
+ };
60
+ }
61
+ /**
62
+ * Options for defineAuthClient.
63
+ */
64
+ interface DefineAuthClientOptions<T extends AuthConfig> {
65
+ /** The neutral auth config (includes RBAC in plugins.admin.ac/roles) */
66
+ config: T;
67
+ /** Base URL for cross-origin requests */
68
+ baseURL?: string;
69
+ /** Client-specific plugin options (optional, for client-only callbacks) */
70
+ plugins?: ClientPluginOptions;
71
+ }
72
+ /**
73
+ * Constructs Better Auth client from neutral config.
74
+ * Returns both client instance and derived features.
75
+ */
76
+ declare function defineAuthClient<T extends AuthConfig>(opts: DefineAuthClientOptions<T>): {
77
+ client: {
78
+ useListPasskeys: () => {
79
+ data: _better_auth_passkey0.Passkey[] | null;
80
+ error: null | better_auth_react0.BetterFetchError;
81
+ isPending: boolean;
82
+ isRefetching: boolean;
83
+ refetch: (queryParams?: {
84
+ query?: better_auth0.SessionQueryParams;
85
+ } | undefined) => Promise<void>;
86
+ };
87
+ } & {
88
+ admin: {
89
+ setRole: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
90
+ userId: string;
91
+ role: "user" | "admin" | ("user" | "admin")[];
92
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
93
+ userId: string;
94
+ role: "user" | "admin" | ("user" | "admin")[];
95
+ } & {
96
+ fetchOptions?: FetchOptions | undefined;
97
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
98
+ user: better_auth_plugins0.UserWithRole;
99
+ }, {
100
+ code?: string | undefined;
101
+ message?: string | undefined;
102
+ }, FetchOptions["throw"] extends true ? true : false>>;
103
+ };
104
+ } & {
105
+ admin: {
106
+ getUser: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
107
+ id: string;
108
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
109
+ query: {
110
+ id: string;
111
+ };
112
+ fetchOptions?: FetchOptions | undefined;
113
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
114
+ id: string;
115
+ createdAt: Date;
116
+ updatedAt: Date;
117
+ email: string;
118
+ emailVerified: boolean;
119
+ name: string;
120
+ image?: string | null | undefined;
121
+ }, {
122
+ code?: string | undefined;
123
+ message?: string | undefined;
124
+ }, FetchOptions["throw"] extends true ? true : false>>;
125
+ };
126
+ } & {
127
+ admin: {
128
+ createUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
129
+ email: string;
130
+ password: string;
131
+ name: string;
132
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
133
+ data?: Record<string, any> | undefined;
134
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
135
+ email: string;
136
+ password: string;
137
+ name: string;
138
+ role?: "user" | "admin" | ("user" | "admin")[] | undefined;
139
+ data?: Record<string, any> | undefined;
140
+ } & {
141
+ fetchOptions?: FetchOptions | undefined;
142
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
143
+ user: better_auth_plugins0.UserWithRole;
144
+ }, {
145
+ code?: string | undefined;
146
+ message?: string | undefined;
147
+ }, FetchOptions["throw"] extends true ? true : false>>;
148
+ };
149
+ } & {
150
+ admin: {
151
+ updateUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
152
+ userId: unknown;
153
+ data: Record<any, any>;
154
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
155
+ userId: unknown;
156
+ data: Record<any, any>;
157
+ } & {
158
+ fetchOptions?: FetchOptions | undefined;
159
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<better_auth_plugins0.UserWithRole, {
160
+ code?: string | undefined;
161
+ message?: string | undefined;
162
+ }, FetchOptions["throw"] extends true ? true : false>>;
163
+ };
164
+ } & {
165
+ admin: {
166
+ listUsers: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
167
+ searchValue?: string | undefined;
168
+ searchField?: "email" | "name" | undefined;
169
+ searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
170
+ limit?: string | number | undefined;
171
+ offset?: string | number | undefined;
172
+ sortBy?: string | undefined;
173
+ sortDirection?: "asc" | "desc" | undefined;
174
+ filterField?: string | undefined;
175
+ filterValue?: string | number | boolean | undefined;
176
+ filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
177
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
178
+ query: {
179
+ searchValue?: string | undefined;
180
+ searchField?: "email" | "name" | undefined;
181
+ searchOperator?: "contains" | "starts_with" | "ends_with" | undefined;
182
+ limit?: string | number | undefined;
183
+ offset?: string | number | undefined;
184
+ sortBy?: string | undefined;
185
+ sortDirection?: "asc" | "desc" | undefined;
186
+ filterField?: string | undefined;
187
+ filterValue?: string | number | boolean | undefined;
188
+ filterOperator?: "contains" | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | undefined;
189
+ };
190
+ fetchOptions?: FetchOptions | undefined;
191
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<NonNullable<{
192
+ users: better_auth_plugins0.UserWithRole[];
193
+ total: number;
194
+ limit: number | undefined;
195
+ offset: number | undefined;
196
+ } | {
197
+ users: never[];
198
+ total: number;
199
+ }>, {
200
+ code?: string | undefined;
201
+ message?: string | undefined;
202
+ }, FetchOptions["throw"] extends true ? true : false>>;
203
+ };
204
+ } & {
205
+ admin: {
206
+ listUserSessions: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
207
+ userId: unknown;
208
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
209
+ userId: unknown;
210
+ } & {
211
+ fetchOptions?: FetchOptions | undefined;
212
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
213
+ sessions: better_auth_plugins0.SessionWithImpersonatedBy[];
214
+ }, {
215
+ code?: string | undefined;
216
+ message?: string | undefined;
217
+ }, FetchOptions["throw"] extends true ? true : false>>;
218
+ };
219
+ } & {
220
+ admin: {
221
+ unbanUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
222
+ userId: unknown;
223
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
224
+ userId: unknown;
225
+ } & {
226
+ fetchOptions?: FetchOptions | undefined;
227
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
228
+ user: {
229
+ id: string;
230
+ createdAt: Date;
231
+ updatedAt: Date;
232
+ email: string;
233
+ emailVerified: boolean;
234
+ name: string;
235
+ image?: string | null | undefined;
236
+ } & Record<string, any>;
237
+ }, {
238
+ code?: string | undefined;
239
+ message?: string | undefined;
240
+ }, FetchOptions["throw"] extends true ? true : false>>;
241
+ };
242
+ } & {
243
+ admin: {
244
+ banUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
245
+ userId: unknown;
246
+ banReason?: string | undefined;
247
+ banExpiresIn?: number | undefined;
248
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
249
+ userId: unknown;
250
+ banReason?: string | undefined;
251
+ banExpiresIn?: number | undefined;
252
+ } & {
253
+ fetchOptions?: FetchOptions | undefined;
254
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
255
+ user: {
256
+ id: string;
257
+ createdAt: Date;
258
+ updatedAt: Date;
259
+ email: string;
260
+ emailVerified: boolean;
261
+ name: string;
262
+ image?: string | null | undefined;
263
+ } & Record<string, any>;
264
+ }, {
265
+ code?: string | undefined;
266
+ message?: string | undefined;
267
+ }, FetchOptions["throw"] extends true ? true : false>>;
268
+ };
269
+ } & {
270
+ admin: {
271
+ impersonateUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
272
+ userId: unknown;
273
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
274
+ userId: unknown;
275
+ } & {
276
+ fetchOptions?: FetchOptions | undefined;
277
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
278
+ session: {
279
+ id: string;
280
+ createdAt: Date;
281
+ updatedAt: Date;
282
+ userId: string;
283
+ expiresAt: Date;
284
+ token: string;
285
+ ipAddress?: string | null | undefined;
286
+ userAgent?: string | null | undefined;
287
+ };
288
+ user: better_auth_plugins0.UserWithRole;
289
+ }, {
290
+ code?: string | undefined;
291
+ message?: string | undefined;
292
+ }, FetchOptions["throw"] extends true ? true : false>>;
293
+ };
294
+ } & {
295
+ admin: {
296
+ stopImpersonating: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
297
+ query?: Record<string, any> | undefined;
298
+ fetchOptions?: FetchOptions | undefined;
299
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
300
+ session: better_auth0.Session & Record<string, any>;
301
+ user: better_auth0.User & Record<string, any>;
302
+ }, {
303
+ code?: string | undefined;
304
+ message?: string | undefined;
305
+ }, FetchOptions["throw"] extends true ? true : false>>;
306
+ };
307
+ } & {
308
+ admin: {
309
+ revokeUserSession: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
310
+ sessionToken: string;
311
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
312
+ sessionToken: string;
313
+ } & {
314
+ fetchOptions?: FetchOptions | undefined;
315
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
316
+ success: boolean;
317
+ }, {
318
+ code?: string | undefined;
319
+ message?: string | undefined;
320
+ }, FetchOptions["throw"] extends true ? true : false>>;
321
+ };
322
+ } & {
323
+ admin: {
324
+ revokeUserSessions: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
325
+ userId: unknown;
326
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
327
+ userId: unknown;
328
+ } & {
329
+ fetchOptions?: FetchOptions | undefined;
330
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
331
+ success: boolean;
332
+ }, {
333
+ code?: string | undefined;
334
+ message?: string | undefined;
335
+ }, FetchOptions["throw"] extends true ? true : false>>;
336
+ };
337
+ } & {
338
+ admin: {
339
+ removeUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
340
+ userId: unknown;
341
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
342
+ userId: unknown;
343
+ } & {
344
+ fetchOptions?: FetchOptions | undefined;
345
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
346
+ success: boolean;
347
+ }, {
348
+ code?: string | undefined;
349
+ message?: string | undefined;
350
+ }, FetchOptions["throw"] extends true ? true : false>>;
351
+ };
352
+ } & {
353
+ admin: {
354
+ setUserPassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
355
+ newPassword: string;
356
+ userId: unknown;
357
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
358
+ newPassword: string;
359
+ userId: unknown;
360
+ } & {
361
+ fetchOptions?: FetchOptions | undefined;
362
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
363
+ status: boolean;
364
+ }, {
365
+ code?: string | undefined;
366
+ message?: string | undefined;
367
+ }, FetchOptions["throw"] extends true ? true : false>>;
368
+ };
369
+ } & {
370
+ admin: {
371
+ hasPermission: <FetchOptions extends better_auth0.ClientFetchOption<Partial<({
372
+ permission: {
373
+ readonly [x: string]: better_auth0.LiteralString[] | undefined;
374
+ };
375
+ permissions?: never | undefined;
376
+ } | {
377
+ permissions: {
378
+ readonly [x: string]: better_auth0.LiteralString[] | undefined;
379
+ };
380
+ permission?: never | undefined;
381
+ }) & {
382
+ userId?: string | undefined;
383
+ role?: string | undefined;
384
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<(({
385
+ permission: {
386
+ readonly [x: string]: better_auth0.LiteralString[] | undefined;
387
+ };
388
+ permissions?: never | undefined;
389
+ } | {
390
+ permissions: {
391
+ readonly [x: string]: better_auth0.LiteralString[] | undefined;
392
+ };
393
+ permission?: never | undefined;
394
+ }) & {
395
+ userId?: string | undefined;
396
+ role?: string | undefined;
397
+ }) & {
398
+ fetchOptions?: FetchOptions | undefined;
399
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
400
+ error: null;
401
+ success: boolean;
402
+ }, {
403
+ code?: string | undefined;
404
+ message?: string | undefined;
405
+ }, FetchOptions["throw"] extends true ? true : false>>;
406
+ };
407
+ } & {
408
+ apiKey: {
409
+ create: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
410
+ name?: string | undefined;
411
+ expiresIn?: number | null | undefined;
412
+ userId?: unknown;
413
+ prefix?: string | undefined;
414
+ remaining?: number | null | undefined;
415
+ metadata?: any;
416
+ refillAmount?: number | undefined;
417
+ refillInterval?: number | undefined;
418
+ rateLimitTimeWindow?: number | undefined;
419
+ rateLimitMax?: number | undefined;
420
+ rateLimitEnabled?: boolean | undefined;
421
+ permissions?: Record<string, string[]> | undefined;
422
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
423
+ name?: string | undefined;
424
+ expiresIn?: number | null | undefined;
425
+ userId?: unknown;
426
+ prefix?: string | undefined;
427
+ remaining?: number | null | undefined;
428
+ metadata?: any;
429
+ refillAmount?: number | undefined;
430
+ refillInterval?: number | undefined;
431
+ rateLimitTimeWindow?: number | undefined;
432
+ rateLimitMax?: number | undefined;
433
+ rateLimitEnabled?: boolean | undefined;
434
+ permissions?: Record<string, string[]> | undefined;
435
+ } & {
436
+ fetchOptions?: FetchOptions | undefined;
437
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
438
+ key: string;
439
+ metadata: any;
440
+ permissions: any;
441
+ id: string;
442
+ name: string | null;
443
+ start: string | null;
444
+ prefix: string | null;
445
+ userId: string;
446
+ refillInterval: number | null;
447
+ refillAmount: number | null;
448
+ lastRefillAt: Date | null;
449
+ enabled: boolean;
450
+ rateLimitEnabled: boolean;
451
+ rateLimitTimeWindow: number | null;
452
+ rateLimitMax: number | null;
453
+ requestCount: number;
454
+ remaining: number | null;
455
+ lastRequest: Date | null;
456
+ expiresAt: Date | null;
457
+ createdAt: Date;
458
+ updatedAt: Date;
459
+ }, {
460
+ code?: string | undefined;
461
+ message?: string | undefined;
462
+ }, FetchOptions["throw"] extends true ? true : false>>;
463
+ };
464
+ } & {
465
+ apiKey: {
466
+ get: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
467
+ id: string;
468
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
469
+ query: {
470
+ id: string;
471
+ };
472
+ fetchOptions?: FetchOptions | undefined;
473
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
474
+ permissions: {
475
+ [key: string]: string[];
476
+ } | null;
477
+ id: string;
478
+ name: string | null;
479
+ start: string | null;
480
+ prefix: string | null;
481
+ userId: string;
482
+ refillInterval: number | null;
483
+ refillAmount: number | null;
484
+ lastRefillAt: Date | null;
485
+ enabled: boolean;
486
+ rateLimitEnabled: boolean;
487
+ rateLimitTimeWindow: number | null;
488
+ rateLimitMax: number | null;
489
+ requestCount: number;
490
+ remaining: number | null;
491
+ lastRequest: Date | null;
492
+ expiresAt: Date | null;
493
+ createdAt: Date;
494
+ updatedAt: Date;
495
+ metadata: Record<string, any> | null;
496
+ }, {
497
+ code?: string | undefined;
498
+ message?: string | undefined;
499
+ }, FetchOptions["throw"] extends true ? true : false>>;
500
+ };
501
+ } & {
502
+ apiKey: {
503
+ update: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
504
+ keyId: string;
505
+ userId?: unknown;
506
+ name?: string | undefined;
507
+ enabled?: boolean | undefined;
508
+ remaining?: number | undefined;
509
+ refillAmount?: number | undefined;
510
+ refillInterval?: number | undefined;
511
+ metadata?: any;
512
+ expiresIn?: number | null | undefined;
513
+ rateLimitEnabled?: boolean | undefined;
514
+ rateLimitTimeWindow?: number | undefined;
515
+ rateLimitMax?: number | undefined;
516
+ permissions?: Record<string, string[]> | null | undefined;
517
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
518
+ keyId: string;
519
+ userId?: unknown;
520
+ name?: string | undefined;
521
+ enabled?: boolean | undefined;
522
+ remaining?: number | undefined;
523
+ refillAmount?: number | undefined;
524
+ refillInterval?: number | undefined;
525
+ metadata?: any;
526
+ expiresIn?: number | null | undefined;
527
+ rateLimitEnabled?: boolean | undefined;
528
+ rateLimitTimeWindow?: number | undefined;
529
+ rateLimitMax?: number | undefined;
530
+ permissions?: Record<string, string[]> | null | undefined;
531
+ } & {
532
+ fetchOptions?: FetchOptions | undefined;
533
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
534
+ permissions: {
535
+ [key: string]: string[];
536
+ } | null;
537
+ id: string;
538
+ name: string | null;
539
+ start: string | null;
540
+ prefix: string | null;
541
+ userId: string;
542
+ refillInterval: number | null;
543
+ refillAmount: number | null;
544
+ lastRefillAt: Date | null;
545
+ enabled: boolean;
546
+ rateLimitEnabled: boolean;
547
+ rateLimitTimeWindow: number | null;
548
+ rateLimitMax: number | null;
549
+ requestCount: number;
550
+ remaining: number | null;
551
+ lastRequest: Date | null;
552
+ expiresAt: Date | null;
553
+ createdAt: Date;
554
+ updatedAt: Date;
555
+ metadata: Record<string, any> | null;
556
+ }, {
557
+ code?: string | undefined;
558
+ message?: string | undefined;
559
+ }, FetchOptions["throw"] extends true ? true : false>>;
560
+ };
561
+ } & {
562
+ apiKey: {
563
+ delete: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
564
+ keyId: string;
565
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
566
+ keyId: string;
567
+ } & {
568
+ fetchOptions?: FetchOptions | undefined;
569
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
570
+ success: boolean;
571
+ }, {
572
+ code?: string | undefined;
573
+ message?: string | undefined;
574
+ }, FetchOptions["throw"] extends true ? true : false>>;
575
+ };
576
+ } & {
577
+ apiKey: {
578
+ list: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
579
+ query?: Record<string, any> | undefined;
580
+ fetchOptions?: FetchOptions | undefined;
581
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
582
+ permissions: {
583
+ [key: string]: string[];
584
+ } | null;
585
+ id: string;
586
+ name: string | null;
587
+ start: string | null;
588
+ prefix: string | null;
589
+ userId: string;
590
+ refillInterval: number | null;
591
+ refillAmount: number | null;
592
+ lastRefillAt: Date | null;
593
+ enabled: boolean;
594
+ rateLimitEnabled: boolean;
595
+ rateLimitTimeWindow: number | null;
596
+ rateLimitMax: number | null;
597
+ requestCount: number;
598
+ remaining: number | null;
599
+ lastRequest: Date | null;
600
+ expiresAt: Date | null;
601
+ createdAt: Date;
602
+ updatedAt: Date;
603
+ metadata: Record<string, any> | null;
604
+ }[], {
605
+ code?: string | undefined;
606
+ message?: string | undefined;
607
+ }, FetchOptions["throw"] extends true ? true : false>>;
608
+ };
609
+ } & {
610
+ twoFactor: {
611
+ enable: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
612
+ password: string;
613
+ issuer?: string | undefined;
614
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
615
+ password: string;
616
+ issuer?: string | undefined;
617
+ } & {
618
+ fetchOptions?: FetchOptions | undefined;
619
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
620
+ totpURI: string;
621
+ backupCodes: string[];
622
+ }, {
623
+ code?: string | undefined;
624
+ message?: string | undefined;
625
+ }, FetchOptions["throw"] extends true ? true : false>>;
626
+ };
627
+ } & {
628
+ twoFactor: {
629
+ disable: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
630
+ password: string;
631
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
632
+ password: string;
633
+ } & {
634
+ fetchOptions?: FetchOptions | undefined;
635
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
636
+ status: boolean;
637
+ }, {
638
+ code?: string | undefined;
639
+ message?: string | undefined;
640
+ }, FetchOptions["throw"] extends true ? true : false>>;
641
+ };
642
+ } & {
643
+ twoFactor: {
644
+ verifyBackupCode: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
645
+ code: string;
646
+ disableSession?: boolean | undefined;
647
+ trustDevice?: boolean | undefined;
648
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
649
+ code: string;
650
+ disableSession?: boolean | undefined;
651
+ trustDevice?: boolean | undefined;
652
+ } & {
653
+ fetchOptions?: FetchOptions | undefined;
654
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
655
+ token: string | undefined;
656
+ user: {
657
+ id: string;
658
+ email: string;
659
+ emailVerified: boolean;
660
+ name: string;
661
+ image: string | null | undefined;
662
+ createdAt: Date;
663
+ updatedAt: Date;
664
+ };
665
+ }, {
666
+ code?: string | undefined;
667
+ message?: string | undefined;
668
+ }, FetchOptions["throw"] extends true ? true : false>>;
669
+ };
670
+ } & {
671
+ twoFactor: {
672
+ generateBackupCodes: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
673
+ password: string;
674
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
675
+ password: string;
676
+ } & {
677
+ fetchOptions?: FetchOptions | undefined;
678
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
679
+ status: boolean;
680
+ backupCodes: string[];
681
+ }, {
682
+ code?: string | undefined;
683
+ message?: string | undefined;
684
+ }, FetchOptions["throw"] extends true ? true : false>>;
685
+ };
686
+ } & {
687
+ twoFactor: {
688
+ sendOtp: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
689
+ trustDevice?: boolean | undefined;
690
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
691
+ query?: Record<string, any> | undefined;
692
+ fetchOptions?: FetchOptions | undefined;
693
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
694
+ status: boolean;
695
+ }, {
696
+ code?: string | undefined;
697
+ message?: string | undefined;
698
+ }, FetchOptions["throw"] extends true ? true : false>>;
699
+ };
700
+ } & {
701
+ twoFactor: {
702
+ verifyOtp: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
703
+ code: string;
704
+ trustDevice?: boolean | undefined;
705
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
706
+ code: string;
707
+ trustDevice?: boolean | undefined;
708
+ } & {
709
+ fetchOptions?: FetchOptions | undefined;
710
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
711
+ token: string;
712
+ user: {
713
+ id: string;
714
+ email: string;
715
+ emailVerified: boolean;
716
+ name: string;
717
+ image: string | null | undefined;
718
+ createdAt: Date;
719
+ updatedAt: Date;
720
+ };
721
+ }, {
722
+ code?: string | undefined;
723
+ message?: string | undefined;
724
+ }, FetchOptions["throw"] extends true ? true : false>>;
725
+ };
726
+ } & {
727
+ twoFactor: {
728
+ getTotpUri: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
729
+ password: string;
730
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
731
+ password: string;
732
+ } & {
733
+ fetchOptions?: FetchOptions | undefined;
734
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
735
+ totpURI: string;
736
+ }, {
737
+ code?: string | undefined;
738
+ message?: string | undefined;
739
+ }, FetchOptions["throw"] extends true ? true : false>>;
740
+ };
741
+ } & {
742
+ twoFactor: {
743
+ verifyTotp: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
744
+ code: string;
745
+ trustDevice?: boolean | undefined;
746
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
747
+ code: string;
748
+ trustDevice?: boolean | undefined;
749
+ } & {
750
+ fetchOptions?: FetchOptions | undefined;
751
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
752
+ token: string;
753
+ user: {
754
+ id: string;
755
+ email: string;
756
+ emailVerified: boolean;
757
+ name: string;
758
+ image: string | null | undefined;
759
+ createdAt: Date;
760
+ updatedAt: Date;
761
+ };
762
+ }, {
763
+ code?: string | undefined;
764
+ message?: string | undefined;
765
+ }, FetchOptions["throw"] extends true ? true : false>>;
766
+ };
767
+ } & {
768
+ passkey: {
769
+ generateRegisterOptions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
770
+ authenticatorAttachment?: "platform" | "cross-platform" | undefined;
771
+ name?: string | undefined;
772
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
773
+ query?: {
774
+ authenticatorAttachment?: "platform" | "cross-platform" | undefined;
775
+ name?: string | undefined;
776
+ } | undefined;
777
+ fetchOptions?: FetchOptions | undefined;
778
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<_better_auth_passkey_client0.PublicKeyCredentialCreationOptionsJSON, {
779
+ code?: string | undefined;
780
+ message?: string | undefined;
781
+ }, FetchOptions["throw"] extends true ? true : false>>;
782
+ };
783
+ } & {
784
+ passkey: {
785
+ generateAuthenticateOptions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
786
+ query?: Record<string, any> | undefined;
787
+ fetchOptions?: FetchOptions | undefined;
788
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<_better_auth_passkey_client0.PublicKeyCredentialRequestOptionsJSON, {
789
+ code?: string | undefined;
790
+ message?: string | undefined;
791
+ }, FetchOptions["throw"] extends true ? true : false>>;
792
+ };
793
+ } & {
794
+ passkey: {
795
+ verifyRegistration: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
796
+ response: any;
797
+ name?: string | undefined;
798
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
799
+ response: any;
800
+ name?: string | undefined;
801
+ } & {
802
+ fetchOptions?: FetchOptions | undefined;
803
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<_better_auth_passkey0.Passkey, {
804
+ code?: string | undefined;
805
+ message?: string | undefined;
806
+ }, FetchOptions["throw"] extends true ? true : false>>;
807
+ };
808
+ } & {
809
+ passkey: {
810
+ verifyAuthentication: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
811
+ response: _better_auth_passkey_client0.AuthenticationResponseJSON;
812
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
813
+ response: _better_auth_passkey_client0.AuthenticationResponseJSON;
814
+ } & {
815
+ fetchOptions?: FetchOptions | undefined;
816
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
817
+ session: {
818
+ id: string;
819
+ createdAt: Date;
820
+ updatedAt: Date;
821
+ userId: string;
822
+ expiresAt: Date;
823
+ token: string;
824
+ ipAddress?: string | null | undefined;
825
+ userAgent?: string | null | undefined;
826
+ };
827
+ }, {
828
+ code?: string | undefined;
829
+ message?: string | undefined;
830
+ }, FetchOptions["throw"] extends true ? true : false>>;
831
+ };
832
+ } & {
833
+ passkey: {
834
+ listUserPasskeys: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
835
+ query?: Record<string, any> | undefined;
836
+ fetchOptions?: FetchOptions | undefined;
837
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<_better_auth_passkey0.Passkey[], {
838
+ code?: string | undefined;
839
+ message?: string | undefined;
840
+ }, FetchOptions["throw"] extends true ? true : false>>;
841
+ };
842
+ } & {
843
+ passkey: {
844
+ deletePasskey: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
845
+ id: string;
846
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
847
+ id: string;
848
+ } & {
849
+ fetchOptions?: FetchOptions | undefined;
850
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
851
+ status: boolean;
852
+ }, {
853
+ code?: string | undefined;
854
+ message?: string | undefined;
855
+ }, FetchOptions["throw"] extends true ? true : false>>;
856
+ };
857
+ } & {
858
+ passkey: {
859
+ updatePasskey: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
860
+ id: string;
861
+ name: string;
862
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
863
+ id: string;
864
+ name: string;
865
+ } & {
866
+ fetchOptions?: FetchOptions | undefined;
867
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
868
+ passkey: _better_auth_passkey0.Passkey;
869
+ }, {
870
+ code?: string | undefined;
871
+ message?: string | undefined;
872
+ }, FetchOptions["throw"] extends true ? true : false>>;
873
+ };
874
+ } & {
875
+ signIn: {
876
+ magicLink: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
877
+ email: string;
878
+ name?: string | undefined;
879
+ callbackURL?: string | undefined;
880
+ newUserCallbackURL?: string | undefined;
881
+ errorCallbackURL?: string | undefined;
882
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
883
+ email: string;
884
+ name?: string | undefined;
885
+ callbackURL?: string | undefined;
886
+ newUserCallbackURL?: string | undefined;
887
+ errorCallbackURL?: string | undefined;
888
+ } & {
889
+ fetchOptions?: FetchOptions | undefined;
890
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
891
+ status: boolean;
892
+ }, {
893
+ code?: string | undefined;
894
+ message?: string | undefined;
895
+ }, FetchOptions["throw"] extends true ? true : false>>;
896
+ };
897
+ } & {
898
+ magicLink: {
899
+ verify: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
900
+ token: string;
901
+ callbackURL?: string | undefined;
902
+ errorCallbackURL?: string | undefined;
903
+ newUserCallbackURL?: string | undefined;
904
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
905
+ query: {
906
+ token: string;
907
+ callbackURL?: string | undefined;
908
+ errorCallbackURL?: string | undefined;
909
+ newUserCallbackURL?: string | undefined;
910
+ };
911
+ fetchOptions?: FetchOptions | undefined;
912
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
913
+ token: string;
914
+ user: {
915
+ id: string;
916
+ email: string;
917
+ emailVerified: boolean;
918
+ name: string;
919
+ image: string | null | undefined;
920
+ createdAt: Date;
921
+ updatedAt: Date;
922
+ };
923
+ }, {
924
+ code?: string | undefined;
925
+ message?: string | undefined;
926
+ }, FetchOptions["throw"] extends true ? true : false>>;
927
+ };
928
+ } & {
929
+ signIn: {
930
+ phoneNumber: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
931
+ phoneNumber: string;
932
+ password: string;
933
+ rememberMe?: boolean | undefined;
934
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
935
+ phoneNumber: string;
936
+ password: string;
937
+ rememberMe?: boolean | undefined;
938
+ } & {
939
+ fetchOptions?: FetchOptions | undefined;
940
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
941
+ token: string;
942
+ user: better_auth_plugins0.UserWithPhoneNumber;
943
+ }, {
944
+ code?: string | undefined;
945
+ message?: string | undefined;
946
+ }, FetchOptions["throw"] extends true ? true : false>>;
947
+ };
948
+ } & {
949
+ phoneNumber: {
950
+ sendOtp: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
951
+ phoneNumber: string;
952
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
953
+ phoneNumber: string;
954
+ } & {
955
+ fetchOptions?: FetchOptions | undefined;
956
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
957
+ message: string;
958
+ }, {
959
+ code?: string | undefined;
960
+ message?: string | undefined;
961
+ }, FetchOptions["throw"] extends true ? true : false>>;
962
+ };
963
+ } & {
964
+ phoneNumber: {
965
+ verify: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
966
+ phoneNumber: string;
967
+ code: string;
968
+ disableSession?: boolean | undefined;
969
+ updatePhoneNumber?: boolean | undefined;
970
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
971
+ phoneNumber: string;
972
+ code: string;
973
+ disableSession?: boolean | undefined;
974
+ updatePhoneNumber?: boolean | undefined;
975
+ } & {
976
+ fetchOptions?: FetchOptions | undefined;
977
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<NonNullable<{
978
+ status: boolean;
979
+ token: string;
980
+ user: better_auth_plugins0.UserWithPhoneNumber;
981
+ } | {
982
+ status: boolean;
983
+ token: null;
984
+ user: better_auth_plugins0.UserWithPhoneNumber;
985
+ }>, {
986
+ code?: string | undefined;
987
+ message?: string | undefined;
988
+ }, FetchOptions["throw"] extends true ? true : false>>;
989
+ };
990
+ } & {
991
+ phoneNumber: {
992
+ requestPasswordReset: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
993
+ phoneNumber: string;
994
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
995
+ phoneNumber: string;
996
+ } & {
997
+ fetchOptions?: FetchOptions | undefined;
998
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
999
+ status: boolean;
1000
+ }, {
1001
+ code?: string | undefined;
1002
+ message?: string | undefined;
1003
+ }, FetchOptions["throw"] extends true ? true : false>>;
1004
+ };
1005
+ } & {
1006
+ phoneNumber: {
1007
+ resetPassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1008
+ otp: string;
1009
+ phoneNumber: string;
1010
+ newPassword: string;
1011
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1012
+ otp: string;
1013
+ phoneNumber: string;
1014
+ newPassword: string;
1015
+ } & {
1016
+ fetchOptions?: FetchOptions | undefined;
1017
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1018
+ status: boolean;
1019
+ }, {
1020
+ code?: string | undefined;
1021
+ message?: string | undefined;
1022
+ }, FetchOptions["throw"] extends true ? true : false>>;
1023
+ };
1024
+ } & {
1025
+ emailOtp: {
1026
+ sendVerificationOtp: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1027
+ email: string;
1028
+ type: "sign-in" | "email-verification" | "forget-password";
1029
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1030
+ email: string;
1031
+ type: "sign-in" | "email-verification" | "forget-password";
1032
+ } & {
1033
+ fetchOptions?: FetchOptions | undefined;
1034
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1035
+ success: boolean;
1036
+ }, {
1037
+ code?: string | undefined;
1038
+ message?: string | undefined;
1039
+ }, FetchOptions["throw"] extends true ? true : false>>;
1040
+ };
1041
+ } & {
1042
+ emailOtp: {
1043
+ checkVerificationOtp: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1044
+ email: string;
1045
+ type: "sign-in" | "email-verification" | "forget-password";
1046
+ otp: string;
1047
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1048
+ email: string;
1049
+ type: "sign-in" | "email-verification" | "forget-password";
1050
+ otp: string;
1051
+ } & {
1052
+ fetchOptions?: FetchOptions | undefined;
1053
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1054
+ success: boolean;
1055
+ }, {
1056
+ code?: string | undefined;
1057
+ message?: string | undefined;
1058
+ }, FetchOptions["throw"] extends true ? true : false>>;
1059
+ };
1060
+ } & {
1061
+ emailOtp: {
1062
+ verifyEmail: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1063
+ email: string;
1064
+ otp: string;
1065
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1066
+ email: string;
1067
+ otp: string;
1068
+ } & {
1069
+ fetchOptions?: FetchOptions | undefined;
1070
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<NonNullable<{
1071
+ status: boolean;
1072
+ token: string;
1073
+ user: {
1074
+ id: string;
1075
+ email: string;
1076
+ emailVerified: boolean;
1077
+ name: string;
1078
+ image: string | null | undefined;
1079
+ createdAt: Date;
1080
+ updatedAt: Date;
1081
+ };
1082
+ } | {
1083
+ status: boolean;
1084
+ token: null;
1085
+ user: {
1086
+ id: string;
1087
+ email: string;
1088
+ emailVerified: boolean;
1089
+ name: string;
1090
+ image: string | null | undefined;
1091
+ createdAt: Date;
1092
+ updatedAt: Date;
1093
+ };
1094
+ }>, {
1095
+ code?: string | undefined;
1096
+ message?: string | undefined;
1097
+ }, FetchOptions["throw"] extends true ? true : false>>;
1098
+ };
1099
+ } & {
1100
+ signIn: {
1101
+ emailOtp: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1102
+ email: string;
1103
+ otp: string;
1104
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1105
+ email: string;
1106
+ otp: string;
1107
+ } & {
1108
+ fetchOptions?: FetchOptions | undefined;
1109
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1110
+ token: string;
1111
+ user: {
1112
+ id: string;
1113
+ email: string;
1114
+ emailVerified: boolean;
1115
+ name: string;
1116
+ image: string | null | undefined;
1117
+ createdAt: Date;
1118
+ updatedAt: Date;
1119
+ };
1120
+ }, {
1121
+ code?: string | undefined;
1122
+ message?: string | undefined;
1123
+ }, FetchOptions["throw"] extends true ? true : false>>;
1124
+ };
1125
+ } & {
1126
+ forgetPassword: {
1127
+ emailOtp: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1128
+ email: string;
1129
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1130
+ email: string;
1131
+ } & {
1132
+ fetchOptions?: FetchOptions | undefined;
1133
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1134
+ success: boolean;
1135
+ }, {
1136
+ code?: string | undefined;
1137
+ message?: string | undefined;
1138
+ }, FetchOptions["throw"] extends true ? true : false>>;
1139
+ };
1140
+ } & {
1141
+ emailOtp: {
1142
+ resetPassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1143
+ email: string;
1144
+ otp: string;
1145
+ password: string;
1146
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1147
+ email: string;
1148
+ otp: string;
1149
+ password: string;
1150
+ } & {
1151
+ fetchOptions?: FetchOptions | undefined;
1152
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1153
+ success: boolean;
1154
+ }, {
1155
+ code?: string | undefined;
1156
+ message?: string | undefined;
1157
+ }, FetchOptions["throw"] extends true ? true : false>>;
1158
+ };
1159
+ } & {
1160
+ signIn: {
1161
+ username: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1162
+ username: string;
1163
+ password: string;
1164
+ rememberMe?: boolean | undefined;
1165
+ callbackURL?: string | undefined;
1166
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1167
+ username: string;
1168
+ password: string;
1169
+ rememberMe?: boolean | undefined;
1170
+ callbackURL?: string | undefined;
1171
+ } & {
1172
+ fetchOptions?: FetchOptions | undefined;
1173
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1174
+ token: string;
1175
+ user: {
1176
+ id: string;
1177
+ email: string;
1178
+ emailVerified: boolean;
1179
+ username: string;
1180
+ displayUsername: string;
1181
+ name: string;
1182
+ image: string | null | undefined;
1183
+ createdAt: Date;
1184
+ updatedAt: Date;
1185
+ };
1186
+ }, {
1187
+ code?: string | undefined;
1188
+ message?: string | undefined;
1189
+ }, FetchOptions["throw"] extends true ? true : false>>;
1190
+ };
1191
+ } & {
1192
+ isUsernameAvailable: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1193
+ username: string;
1194
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1195
+ username: string;
1196
+ } & {
1197
+ fetchOptions?: FetchOptions | undefined;
1198
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1199
+ available: boolean;
1200
+ }, {
1201
+ code?: string | undefined;
1202
+ message?: string | undefined;
1203
+ }, FetchOptions["throw"] extends true ? true : false>>;
1204
+ } & {
1205
+ signIn: {
1206
+ anonymous: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1207
+ query?: Record<string, any> | undefined;
1208
+ fetchOptions?: FetchOptions | undefined;
1209
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1210
+ token: string;
1211
+ user: {
1212
+ id: string;
1213
+ email: string;
1214
+ emailVerified: boolean;
1215
+ name: string;
1216
+ createdAt: Date;
1217
+ updatedAt: Date;
1218
+ };
1219
+ }, {
1220
+ code?: string | undefined;
1221
+ message?: string | undefined;
1222
+ }, FetchOptions["throw"] extends true ? true : false>>;
1223
+ };
1224
+ } & {
1225
+ multiSession: {
1226
+ listDeviceSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1227
+ query?: Record<string, any> | undefined;
1228
+ fetchOptions?: FetchOptions | undefined;
1229
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1230
+ user: {
1231
+ id: string;
1232
+ createdAt: Date;
1233
+ updatedAt: Date;
1234
+ email: string;
1235
+ emailVerified: boolean;
1236
+ name: string;
1237
+ image?: string | null | undefined;
1238
+ };
1239
+ session: {
1240
+ id: string;
1241
+ createdAt: Date;
1242
+ updatedAt: Date;
1243
+ userId: string;
1244
+ expiresAt: Date;
1245
+ token: string;
1246
+ ipAddress?: string | null | undefined;
1247
+ userAgent?: string | null | undefined;
1248
+ };
1249
+ }[], {
1250
+ code?: string | undefined;
1251
+ message?: string | undefined;
1252
+ }, FetchOptions["throw"] extends true ? true : false>>;
1253
+ };
1254
+ } & {
1255
+ multiSession: {
1256
+ setActive: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1257
+ sessionToken: string;
1258
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1259
+ sessionToken: string;
1260
+ } & {
1261
+ fetchOptions?: FetchOptions | undefined;
1262
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1263
+ session: better_auth0.Session & Record<string, any>;
1264
+ user: better_auth0.User & Record<string, any>;
1265
+ }, {
1266
+ code?: string | undefined;
1267
+ message?: string | undefined;
1268
+ }, FetchOptions["throw"] extends true ? true : false>>;
1269
+ };
1270
+ } & {
1271
+ multiSession: {
1272
+ revoke: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1273
+ sessionToken: string;
1274
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1275
+ sessionToken: string;
1276
+ } & {
1277
+ fetchOptions?: FetchOptions | undefined;
1278
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1279
+ status: boolean;
1280
+ }, {
1281
+ code?: string | undefined;
1282
+ message?: string | undefined;
1283
+ }, FetchOptions["throw"] extends true ? true : false>>;
1284
+ };
1285
+ } & {
1286
+ sso: {
1287
+ saml2: {
1288
+ sp: {
1289
+ metadata: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
1290
+ providerId: string;
1291
+ format?: "json" | "xml" | undefined;
1292
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1293
+ query: {
1294
+ providerId: string;
1295
+ format?: "json" | "xml" | undefined;
1296
+ };
1297
+ fetchOptions?: FetchOptions | undefined;
1298
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<Response, {
1299
+ code?: string | undefined;
1300
+ message?: string | undefined;
1301
+ }, FetchOptions["throw"] extends true ? true : false>>;
1302
+ };
1303
+ };
1304
+ };
1305
+ } & {
1306
+ sso: {
1307
+ register: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1308
+ providerId: string;
1309
+ issuer: string;
1310
+ domain: string;
1311
+ oidcConfig?: {
1312
+ clientId: string;
1313
+ clientSecret: string;
1314
+ authorizationEndpoint?: string | undefined;
1315
+ tokenEndpoint?: string | undefined;
1316
+ userInfoEndpoint?: string | undefined;
1317
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
1318
+ jwksEndpoint?: string | undefined;
1319
+ discoveryEndpoint?: string | undefined;
1320
+ skipDiscovery?: boolean | undefined;
1321
+ scopes?: string[] | undefined;
1322
+ pkce?: boolean | undefined;
1323
+ mapping?: {
1324
+ id: string;
1325
+ email: string;
1326
+ name: string;
1327
+ emailVerified?: string | undefined;
1328
+ image?: string | undefined;
1329
+ extraFields?: Record<string, any> | undefined;
1330
+ } | undefined;
1331
+ } | undefined;
1332
+ samlConfig?: {
1333
+ entryPoint: string;
1334
+ cert: string;
1335
+ callbackUrl: string;
1336
+ spMetadata: {
1337
+ metadata?: string | undefined;
1338
+ entityID?: string | undefined;
1339
+ binding?: string | undefined;
1340
+ privateKey?: string | undefined;
1341
+ privateKeyPass?: string | undefined;
1342
+ isAssertionEncrypted?: boolean | undefined;
1343
+ encPrivateKey?: string | undefined;
1344
+ encPrivateKeyPass?: string | undefined;
1345
+ };
1346
+ audience?: string | undefined;
1347
+ idpMetadata?: {
1348
+ metadata?: string | undefined;
1349
+ entityID?: string | undefined;
1350
+ cert?: string | undefined;
1351
+ privateKey?: string | undefined;
1352
+ privateKeyPass?: string | undefined;
1353
+ isAssertionEncrypted?: boolean | undefined;
1354
+ encPrivateKey?: string | undefined;
1355
+ encPrivateKeyPass?: string | undefined;
1356
+ singleSignOnService?: {
1357
+ Binding: string;
1358
+ Location: string;
1359
+ }[] | undefined;
1360
+ } | undefined;
1361
+ wantAssertionsSigned?: boolean | undefined;
1362
+ signatureAlgorithm?: string | undefined;
1363
+ digestAlgorithm?: string | undefined;
1364
+ identifierFormat?: string | undefined;
1365
+ privateKey?: string | undefined;
1366
+ decryptionPvk?: string | undefined;
1367
+ additionalParams?: Record<string, any> | undefined;
1368
+ mapping?: {
1369
+ id: string;
1370
+ email: string;
1371
+ name: string;
1372
+ emailVerified?: string | undefined;
1373
+ firstName?: string | undefined;
1374
+ lastName?: string | undefined;
1375
+ extraFields?: Record<string, any> | undefined;
1376
+ } | undefined;
1377
+ } | undefined;
1378
+ organizationId?: string | undefined;
1379
+ overrideUserInfo?: boolean | undefined;
1380
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1381
+ providerId: string;
1382
+ issuer: string;
1383
+ domain: string;
1384
+ oidcConfig?: {
1385
+ clientId: string;
1386
+ clientSecret: string;
1387
+ authorizationEndpoint?: string | undefined;
1388
+ tokenEndpoint?: string | undefined;
1389
+ userInfoEndpoint?: string | undefined;
1390
+ tokenEndpointAuthentication?: "client_secret_post" | "client_secret_basic" | undefined;
1391
+ jwksEndpoint?: string | undefined;
1392
+ discoveryEndpoint?: string | undefined;
1393
+ skipDiscovery?: boolean | undefined;
1394
+ scopes?: string[] | undefined;
1395
+ pkce?: boolean | undefined;
1396
+ mapping?: {
1397
+ id: string;
1398
+ email: string;
1399
+ name: string;
1400
+ emailVerified?: string | undefined;
1401
+ image?: string | undefined;
1402
+ extraFields?: Record<string, any> | undefined;
1403
+ } | undefined;
1404
+ } | undefined;
1405
+ samlConfig?: {
1406
+ entryPoint: string;
1407
+ cert: string;
1408
+ callbackUrl: string;
1409
+ spMetadata: {
1410
+ metadata?: string | undefined;
1411
+ entityID?: string | undefined;
1412
+ binding?: string | undefined;
1413
+ privateKey?: string | undefined;
1414
+ privateKeyPass?: string | undefined;
1415
+ isAssertionEncrypted?: boolean | undefined;
1416
+ encPrivateKey?: string | undefined;
1417
+ encPrivateKeyPass?: string | undefined;
1418
+ };
1419
+ audience?: string | undefined;
1420
+ idpMetadata?: {
1421
+ metadata?: string | undefined;
1422
+ entityID?: string | undefined;
1423
+ cert?: string | undefined;
1424
+ privateKey?: string | undefined;
1425
+ privateKeyPass?: string | undefined;
1426
+ isAssertionEncrypted?: boolean | undefined;
1427
+ encPrivateKey?: string | undefined;
1428
+ encPrivateKeyPass?: string | undefined;
1429
+ singleSignOnService?: {
1430
+ Binding: string;
1431
+ Location: string;
1432
+ }[] | undefined;
1433
+ } | undefined;
1434
+ wantAssertionsSigned?: boolean | undefined;
1435
+ signatureAlgorithm?: string | undefined;
1436
+ digestAlgorithm?: string | undefined;
1437
+ identifierFormat?: string | undefined;
1438
+ privateKey?: string | undefined;
1439
+ decryptionPvk?: string | undefined;
1440
+ additionalParams?: Record<string, any> | undefined;
1441
+ mapping?: {
1442
+ id: string;
1443
+ email: string;
1444
+ name: string;
1445
+ emailVerified?: string | undefined;
1446
+ firstName?: string | undefined;
1447
+ lastName?: string | undefined;
1448
+ extraFields?: Record<string, any> | undefined;
1449
+ } | undefined;
1450
+ } | undefined;
1451
+ organizationId?: string | undefined;
1452
+ overrideUserInfo?: boolean | undefined;
1453
+ } & {
1454
+ fetchOptions?: FetchOptions | undefined;
1455
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1456
+ issuer: string;
1457
+ oidcConfig?: _better_auth_sso0.OIDCConfig | undefined;
1458
+ samlConfig?: _better_auth_sso0.SAMLConfig | undefined;
1459
+ userId: string;
1460
+ providerId: string;
1461
+ organizationId?: string | undefined;
1462
+ domain: string;
1463
+ }, {
1464
+ code?: string | undefined;
1465
+ message?: string | undefined;
1466
+ }, FetchOptions["throw"] extends true ? true : false>>;
1467
+ };
1468
+ } & {
1469
+ signIn: {
1470
+ sso: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1471
+ callbackURL: string;
1472
+ email?: string | undefined;
1473
+ organizationSlug?: string | undefined;
1474
+ providerId?: string | undefined;
1475
+ domain?: string | undefined;
1476
+ errorCallbackURL?: string | undefined;
1477
+ newUserCallbackURL?: string | undefined;
1478
+ scopes?: string[] | undefined;
1479
+ loginHint?: string | undefined;
1480
+ requestSignUp?: boolean | undefined;
1481
+ providerType?: "saml" | "oidc" | undefined;
1482
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1483
+ callbackURL: string;
1484
+ email?: string | undefined;
1485
+ organizationSlug?: string | undefined;
1486
+ providerId?: string | undefined;
1487
+ domain?: string | undefined;
1488
+ errorCallbackURL?: string | undefined;
1489
+ newUserCallbackURL?: string | undefined;
1490
+ scopes?: string[] | undefined;
1491
+ loginHint?: string | undefined;
1492
+ requestSignUp?: boolean | undefined;
1493
+ providerType?: "saml" | "oidc" | undefined;
1494
+ } & {
1495
+ fetchOptions?: FetchOptions | undefined;
1496
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1497
+ url: string;
1498
+ redirect: boolean;
1499
+ }, {
1500
+ code?: string | undefined;
1501
+ message?: string | undefined;
1502
+ }, FetchOptions["throw"] extends true ? true : false>>;
1503
+ };
1504
+ } & {
1505
+ signIn: {
1506
+ social: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1507
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
1508
+ callbackURL?: string | undefined;
1509
+ newUserCallbackURL?: string | undefined;
1510
+ errorCallbackURL?: string | undefined;
1511
+ disableRedirect?: boolean | undefined;
1512
+ idToken?: {
1513
+ token: string;
1514
+ nonce?: string | undefined;
1515
+ accessToken?: string | undefined;
1516
+ refreshToken?: string | undefined;
1517
+ expiresAt?: number | undefined;
1518
+ } | undefined;
1519
+ scopes?: string[] | undefined;
1520
+ requestSignUp?: boolean | undefined;
1521
+ loginHint?: string | undefined;
1522
+ additionalData?: Record<string, any> | undefined;
1523
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1524
+ provider: (string & {}) | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel";
1525
+ callbackURL?: string | undefined;
1526
+ newUserCallbackURL?: string | undefined;
1527
+ errorCallbackURL?: string | undefined;
1528
+ disableRedirect?: boolean | undefined;
1529
+ idToken?: {
1530
+ token: string;
1531
+ nonce?: string | undefined;
1532
+ accessToken?: string | undefined;
1533
+ refreshToken?: string | undefined;
1534
+ expiresAt?: number | undefined;
1535
+ } | undefined;
1536
+ scopes?: string[] | undefined;
1537
+ requestSignUp?: boolean | undefined;
1538
+ loginHint?: string | undefined;
1539
+ additionalData?: Record<string, any> | undefined;
1540
+ } & {
1541
+ fetchOptions?: FetchOptions | undefined;
1542
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<NonNullable<{
1543
+ redirect: boolean;
1544
+ url: string;
1545
+ } | {
1546
+ redirect: boolean;
1547
+ token: string;
1548
+ url: undefined;
1549
+ user: {
1550
+ id: string;
1551
+ createdAt: Date;
1552
+ updatedAt: Date;
1553
+ email: string;
1554
+ emailVerified: boolean;
1555
+ name: string;
1556
+ image?: string | null | undefined | undefined;
1557
+ };
1558
+ }>, {
1559
+ code?: string | undefined;
1560
+ message?: string | undefined;
1561
+ }, FetchOptions["throw"] extends true ? true : false>>;
1562
+ };
1563
+ } & {
1564
+ signOut: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1565
+ query?: Record<string, any> | undefined;
1566
+ fetchOptions?: FetchOptions | undefined;
1567
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1568
+ success: boolean;
1569
+ }, {
1570
+ code?: string | undefined;
1571
+ message?: string | undefined;
1572
+ }, FetchOptions["throw"] extends true ? true : false>>;
1573
+ } & {
1574
+ signUp: {
1575
+ email: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1576
+ name: string;
1577
+ email: string;
1578
+ password: string;
1579
+ image?: string | undefined;
1580
+ callbackURL?: string | undefined;
1581
+ rememberMe?: boolean | undefined;
1582
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1583
+ email: string;
1584
+ name: string;
1585
+ password: string;
1586
+ image?: string | undefined;
1587
+ callbackURL?: string | undefined;
1588
+ fetchOptions?: FetchOptions | undefined;
1589
+ } & {} & {} & {} & {} & {} & {
1590
+ phoneNumber?: string | null | undefined;
1591
+ } & {} & {
1592
+ username?: string | null | undefined;
1593
+ displayUsername?: string | null | undefined;
1594
+ } & {} & {}>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<NonNullable<{
1595
+ token: null;
1596
+ user: {
1597
+ id: string;
1598
+ createdAt: Date;
1599
+ updatedAt: Date;
1600
+ email: string;
1601
+ emailVerified: boolean;
1602
+ name: string;
1603
+ image?: string | null | undefined | undefined;
1604
+ };
1605
+ } | {
1606
+ token: string;
1607
+ user: {
1608
+ id: string;
1609
+ createdAt: Date;
1610
+ updatedAt: Date;
1611
+ email: string;
1612
+ emailVerified: boolean;
1613
+ name: string;
1614
+ image?: string | null | undefined | undefined;
1615
+ };
1616
+ }>, {
1617
+ code?: string | undefined;
1618
+ message?: string | undefined;
1619
+ }, FetchOptions["throw"] extends true ? true : false>>;
1620
+ };
1621
+ } & {
1622
+ signIn: {
1623
+ email: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1624
+ email: string;
1625
+ password: string;
1626
+ callbackURL?: string | undefined;
1627
+ rememberMe?: boolean | undefined;
1628
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1629
+ email: string;
1630
+ password: string;
1631
+ callbackURL?: string | undefined;
1632
+ rememberMe?: boolean | undefined;
1633
+ } & {
1634
+ fetchOptions?: FetchOptions | undefined;
1635
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1636
+ redirect: boolean;
1637
+ token: string;
1638
+ url?: string | undefined;
1639
+ user: {
1640
+ id: string;
1641
+ createdAt: Date;
1642
+ updatedAt: Date;
1643
+ email: string;
1644
+ emailVerified: boolean;
1645
+ name: string;
1646
+ image?: string | null | undefined | undefined;
1647
+ };
1648
+ }, {
1649
+ code?: string | undefined;
1650
+ message?: string | undefined;
1651
+ }, FetchOptions["throw"] extends true ? true : false>>;
1652
+ };
1653
+ } & {
1654
+ resetPassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1655
+ newPassword: string;
1656
+ token?: string | undefined;
1657
+ }> & Record<string, any>, Partial<{
1658
+ token?: string | undefined;
1659
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1660
+ newPassword: string;
1661
+ token?: string | undefined;
1662
+ } & {
1663
+ fetchOptions?: FetchOptions | undefined;
1664
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1665
+ status: boolean;
1666
+ }, {
1667
+ code?: string | undefined;
1668
+ message?: string | undefined;
1669
+ }, FetchOptions["throw"] extends true ? true : false>>;
1670
+ } & {
1671
+ verifyEmail: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
1672
+ token: string;
1673
+ callbackURL?: string | undefined;
1674
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1675
+ query: {
1676
+ token: string;
1677
+ callbackURL?: string | undefined;
1678
+ };
1679
+ fetchOptions?: FetchOptions | undefined;
1680
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<NonNullable<void | {
1681
+ status: boolean;
1682
+ }>, {
1683
+ code?: string | undefined;
1684
+ message?: string | undefined;
1685
+ }, FetchOptions["throw"] extends true ? true : false>>;
1686
+ } & {
1687
+ sendVerificationEmail: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1688
+ email: string;
1689
+ callbackURL?: string | undefined;
1690
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1691
+ email: string;
1692
+ callbackURL?: string | undefined;
1693
+ } & {
1694
+ fetchOptions?: FetchOptions | undefined;
1695
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1696
+ status: boolean;
1697
+ }, {
1698
+ code?: string | undefined;
1699
+ message?: string | undefined;
1700
+ }, FetchOptions["throw"] extends true ? true : false>>;
1701
+ } & {
1702
+ changeEmail: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1703
+ newEmail: string;
1704
+ callbackURL?: string | undefined;
1705
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1706
+ newEmail: string;
1707
+ callbackURL?: string | undefined;
1708
+ } & {
1709
+ fetchOptions?: FetchOptions | undefined;
1710
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1711
+ status: boolean;
1712
+ }, {
1713
+ code?: string | undefined;
1714
+ message?: string | undefined;
1715
+ }, FetchOptions["throw"] extends true ? true : false>>;
1716
+ } & {
1717
+ changePassword: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1718
+ newPassword: string;
1719
+ currentPassword: string;
1720
+ revokeOtherSessions?: boolean | undefined;
1721
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1722
+ newPassword: string;
1723
+ currentPassword: string;
1724
+ revokeOtherSessions?: boolean | undefined;
1725
+ } & {
1726
+ fetchOptions?: FetchOptions | undefined;
1727
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1728
+ token: string | null;
1729
+ user: {
1730
+ id: string;
1731
+ email: string;
1732
+ name: string;
1733
+ image: string | null | undefined;
1734
+ emailVerified: boolean;
1735
+ createdAt: Date;
1736
+ updatedAt: Date;
1737
+ };
1738
+ }, {
1739
+ code?: string | undefined;
1740
+ message?: string | undefined;
1741
+ }, FetchOptions["throw"] extends true ? true : false>>;
1742
+ } & {
1743
+ updateUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<Partial<{}> & {
1744
+ name?: string | undefined;
1745
+ image?: string | undefined | null;
1746
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1747
+ image?: (string | null) | undefined;
1748
+ name?: string | undefined;
1749
+ fetchOptions?: FetchOptions | undefined;
1750
+ } & Partial<{} & {} & {} & {} & {} & {
1751
+ phoneNumber?: string | null | undefined;
1752
+ } & {} & {
1753
+ username?: string | null | undefined;
1754
+ displayUsername?: string | null | undefined;
1755
+ } & {} & {}>> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1756
+ status: boolean;
1757
+ }, {
1758
+ code?: string | undefined;
1759
+ message?: string | undefined;
1760
+ }, FetchOptions["throw"] extends true ? true : false>>;
1761
+ } & {
1762
+ deleteUser: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1763
+ callbackURL?: string | undefined;
1764
+ password?: string | undefined;
1765
+ token?: string | undefined;
1766
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1767
+ callbackURL?: string | undefined;
1768
+ password?: string | undefined;
1769
+ token?: string | undefined;
1770
+ } & {
1771
+ fetchOptions?: FetchOptions | undefined;
1772
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1773
+ success: boolean;
1774
+ message: string;
1775
+ }, {
1776
+ code?: string | undefined;
1777
+ message?: string | undefined;
1778
+ }, FetchOptions["throw"] extends true ? true : false>>;
1779
+ } & {
1780
+ requestPasswordReset: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1781
+ email: string;
1782
+ redirectTo?: string | undefined;
1783
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1784
+ email: string;
1785
+ redirectTo?: string | undefined;
1786
+ } & {
1787
+ fetchOptions?: FetchOptions | undefined;
1788
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1789
+ status: boolean;
1790
+ message: string;
1791
+ }, {
1792
+ code?: string | undefined;
1793
+ message?: string | undefined;
1794
+ }, FetchOptions["throw"] extends true ? true : false>>;
1795
+ } & {
1796
+ resetPassword: {
1797
+ ":token": <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
1798
+ callbackURL: string;
1799
+ }> & Record<string, any>, {
1800
+ token: string;
1801
+ }>>(data_0: better_auth0.Prettify<{
1802
+ query: {
1803
+ callbackURL: string;
1804
+ };
1805
+ fetchOptions?: FetchOptions | undefined;
1806
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<never, {
1807
+ code?: string | undefined;
1808
+ message?: string | undefined;
1809
+ }, FetchOptions["throw"] extends true ? true : false>>;
1810
+ };
1811
+ } & {
1812
+ listSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1813
+ query?: Record<string, any> | undefined;
1814
+ fetchOptions?: FetchOptions | undefined;
1815
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<better_auth0.Prettify<{
1816
+ id: string;
1817
+ createdAt: Date;
1818
+ updatedAt: Date;
1819
+ userId: string;
1820
+ expiresAt: Date;
1821
+ token: string;
1822
+ ipAddress?: string | null | undefined | undefined;
1823
+ userAgent?: string | null | undefined | undefined;
1824
+ }>[], {
1825
+ code?: string | undefined;
1826
+ message?: string | undefined;
1827
+ }, FetchOptions["throw"] extends true ? true : false>>;
1828
+ } & {
1829
+ revokeSession: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1830
+ token: string;
1831
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1832
+ token: string;
1833
+ } & {
1834
+ fetchOptions?: FetchOptions | undefined;
1835
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1836
+ status: boolean;
1837
+ }, {
1838
+ code?: string | undefined;
1839
+ message?: string | undefined;
1840
+ }, FetchOptions["throw"] extends true ? true : false>>;
1841
+ } & {
1842
+ revokeSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1843
+ query?: Record<string, any> | undefined;
1844
+ fetchOptions?: FetchOptions | undefined;
1845
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1846
+ status: boolean;
1847
+ }, {
1848
+ code?: string | undefined;
1849
+ message?: string | undefined;
1850
+ }, FetchOptions["throw"] extends true ? true : false>>;
1851
+ } & {
1852
+ revokeOtherSessions: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1853
+ query?: Record<string, any> | undefined;
1854
+ fetchOptions?: FetchOptions | undefined;
1855
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1856
+ status: boolean;
1857
+ }, {
1858
+ code?: string | undefined;
1859
+ message?: string | undefined;
1860
+ }, FetchOptions["throw"] extends true ? true : false>>;
1861
+ } & {
1862
+ linkSocial: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1863
+ provider: unknown;
1864
+ callbackURL?: string | undefined;
1865
+ idToken?: {
1866
+ token: string;
1867
+ nonce?: string | undefined;
1868
+ accessToken?: string | undefined;
1869
+ refreshToken?: string | undefined;
1870
+ scopes?: string[] | undefined;
1871
+ } | undefined;
1872
+ requestSignUp?: boolean | undefined;
1873
+ scopes?: string[] | undefined;
1874
+ errorCallbackURL?: string | undefined;
1875
+ disableRedirect?: boolean | undefined;
1876
+ additionalData?: Record<string, any> | undefined;
1877
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1878
+ provider: unknown;
1879
+ callbackURL?: string | undefined;
1880
+ idToken?: {
1881
+ token: string;
1882
+ nonce?: string | undefined;
1883
+ accessToken?: string | undefined;
1884
+ refreshToken?: string | undefined;
1885
+ scopes?: string[] | undefined;
1886
+ } | undefined;
1887
+ requestSignUp?: boolean | undefined;
1888
+ scopes?: string[] | undefined;
1889
+ errorCallbackURL?: string | undefined;
1890
+ disableRedirect?: boolean | undefined;
1891
+ additionalData?: Record<string, any> | undefined;
1892
+ } & {
1893
+ fetchOptions?: FetchOptions | undefined;
1894
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1895
+ url: string;
1896
+ redirect: boolean;
1897
+ }, {
1898
+ code?: string | undefined;
1899
+ message?: string | undefined;
1900
+ }, FetchOptions["throw"] extends true ? true : false>>;
1901
+ } & {
1902
+ listAccounts: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1903
+ query?: Record<string, any> | undefined;
1904
+ fetchOptions?: FetchOptions | undefined;
1905
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1906
+ id: string;
1907
+ providerId: string;
1908
+ createdAt: Date;
1909
+ updatedAt: Date;
1910
+ accountId: string;
1911
+ userId: string;
1912
+ scopes: string[];
1913
+ }[], {
1914
+ code?: string | undefined;
1915
+ message?: string | undefined;
1916
+ }, FetchOptions["throw"] extends true ? true : false>>;
1917
+ } & {
1918
+ deleteUser: {
1919
+ callback: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
1920
+ token: string;
1921
+ callbackURL?: string | undefined;
1922
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1923
+ query: {
1924
+ token: string;
1925
+ callbackURL?: string | undefined;
1926
+ };
1927
+ fetchOptions?: FetchOptions | undefined;
1928
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1929
+ success: boolean;
1930
+ message: string;
1931
+ }, {
1932
+ code?: string | undefined;
1933
+ message?: string | undefined;
1934
+ }, FetchOptions["throw"] extends true ? true : false>>;
1935
+ };
1936
+ } & {
1937
+ unlinkAccount: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1938
+ providerId: string;
1939
+ accountId?: string | undefined;
1940
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1941
+ providerId: string;
1942
+ accountId?: string | undefined;
1943
+ } & {
1944
+ fetchOptions?: FetchOptions | undefined;
1945
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1946
+ status: boolean;
1947
+ }, {
1948
+ code?: string | undefined;
1949
+ message?: string | undefined;
1950
+ }, FetchOptions["throw"] extends true ? true : false>>;
1951
+ } & {
1952
+ refreshToken: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1953
+ providerId: string;
1954
+ accountId?: string | undefined;
1955
+ userId?: string | undefined;
1956
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1957
+ providerId: string;
1958
+ accountId?: string | undefined;
1959
+ userId?: string | undefined;
1960
+ } & {
1961
+ fetchOptions?: FetchOptions | undefined;
1962
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1963
+ accessToken: string | undefined;
1964
+ refreshToken: string | undefined;
1965
+ accessTokenExpiresAt: Date | undefined;
1966
+ refreshTokenExpiresAt: Date | undefined;
1967
+ scope: string | null | undefined;
1968
+ idToken: string | null | undefined;
1969
+ providerId: string;
1970
+ accountId: string;
1971
+ }, {
1972
+ code?: string | undefined;
1973
+ message?: string | undefined;
1974
+ }, FetchOptions["throw"] extends true ? true : false>>;
1975
+ } & {
1976
+ getAccessToken: <FetchOptions extends better_auth0.ClientFetchOption<Partial<{
1977
+ providerId: string;
1978
+ accountId?: string | undefined;
1979
+ userId?: string | undefined;
1980
+ }> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: better_auth0.Prettify<{
1981
+ providerId: string;
1982
+ accountId?: string | undefined;
1983
+ userId?: string | undefined;
1984
+ } & {
1985
+ fetchOptions?: FetchOptions | undefined;
1986
+ }>, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
1987
+ accessToken: string;
1988
+ accessTokenExpiresAt: Date | undefined;
1989
+ scopes: string[];
1990
+ idToken: string | undefined;
1991
+ }, {
1992
+ code?: string | undefined;
1993
+ message?: string | undefined;
1994
+ }, FetchOptions["throw"] extends true ? true : false>>;
1995
+ } & {
1996
+ accountInfo: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
1997
+ accountId?: string | undefined;
1998
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
1999
+ query?: {
2000
+ accountId?: string | undefined;
2001
+ } | undefined;
2002
+ fetchOptions?: FetchOptions | undefined;
2003
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
2004
+ user: better_auth0.OAuth2UserInfo;
2005
+ data: Record<string, any>;
2006
+ }, {
2007
+ code?: string | undefined;
2008
+ message?: string | undefined;
2009
+ }, FetchOptions["throw"] extends true ? true : false>>;
2010
+ } & {
2011
+ getSession: <FetchOptions extends better_auth0.ClientFetchOption<never, Partial<{
2012
+ disableCookieCache?: unknown;
2013
+ disableRefresh?: unknown;
2014
+ }> & Record<string, any>, Record<string, any> | undefined>>(data_0?: better_auth0.Prettify<{
2015
+ query?: {
2016
+ disableCookieCache?: unknown;
2017
+ disableRefresh?: unknown;
2018
+ } | undefined;
2019
+ fetchOptions?: FetchOptions | undefined;
2020
+ }> | undefined, data_1?: FetchOptions | undefined) => Promise<better_auth_react0.BetterFetchResponse<{
2021
+ user: {
2022
+ id: string;
2023
+ createdAt: Date;
2024
+ updatedAt: Date;
2025
+ email: string;
2026
+ emailVerified: boolean;
2027
+ name: string;
2028
+ image?: string | null | undefined;
2029
+ banned: boolean | null | undefined;
2030
+ role?: string | null | undefined;
2031
+ banReason?: string | null | undefined;
2032
+ banExpires?: Date | null | undefined;
2033
+ twoFactorEnabled: boolean | null | undefined;
2034
+ phoneNumber?: string | null | undefined;
2035
+ phoneNumberVerified?: boolean | null | undefined;
2036
+ username?: string | null | undefined;
2037
+ displayUsername?: string | null | undefined;
2038
+ isAnonymous: boolean | null | undefined;
2039
+ };
2040
+ session: {
2041
+ id: string;
2042
+ createdAt: Date;
2043
+ updatedAt: Date;
2044
+ userId: string;
2045
+ expiresAt: Date;
2046
+ token: string;
2047
+ ipAddress?: string | null | undefined;
2048
+ userAgent?: string | null | undefined;
2049
+ impersonatedBy?: string | null | undefined;
2050
+ };
2051
+ } | null, {
2052
+ code?: string | undefined;
2053
+ message?: string | undefined;
2054
+ }, FetchOptions["throw"] extends true ? true : false>>;
2055
+ } & {
2056
+ admin: {
2057
+ checkRolePermission: <R extends string>(data: ({
2058
+ permission: {
2059
+ readonly [x: string]: better_auth0.LiteralString[] | undefined;
2060
+ };
2061
+ permissions?: never | undefined;
2062
+ } | {
2063
+ permissions: {
2064
+ readonly [x: string]: better_auth0.LiteralString[] | undefined;
2065
+ };
2066
+ permission?: never | undefined;
2067
+ }) & {
2068
+ role: R;
2069
+ }) => boolean;
2070
+ };
2071
+ } & {
2072
+ signIn: {
2073
+ passkey: (opts?: {
2074
+ autoFill?: boolean;
2075
+ fetchOptions?: better_auth0.ClientFetchOption;
2076
+ } | undefined, options?: better_auth0.ClientFetchOption | undefined) => Promise<{
2077
+ data: null;
2078
+ error: {
2079
+ message?: string | undefined;
2080
+ status: number;
2081
+ statusText: string;
2082
+ };
2083
+ } | {
2084
+ data: {
2085
+ session: better_auth0.Session;
2086
+ user: better_auth0.User;
2087
+ };
2088
+ error: null;
2089
+ } | {
2090
+ data: null;
2091
+ error: {
2092
+ code: string;
2093
+ message: string;
2094
+ status: number;
2095
+ statusText: string;
2096
+ };
2097
+ }>;
2098
+ };
2099
+ passkey: {
2100
+ addPasskey: (opts?: {
2101
+ fetchOptions?: better_auth0.ClientFetchOption;
2102
+ name?: string;
2103
+ authenticatorAttachment?: "platform" | "cross-platform";
2104
+ useAutoRegister?: boolean;
2105
+ } | undefined, fetchOpts?: better_auth0.ClientFetchOption | undefined) => Promise<{
2106
+ data: null;
2107
+ error: {
2108
+ message?: string | undefined;
2109
+ status: number;
2110
+ statusText: string;
2111
+ };
2112
+ } | {
2113
+ data: _better_auth_passkey0.Passkey;
2114
+ error: null;
2115
+ } | {
2116
+ data: null;
2117
+ error: {
2118
+ code: string;
2119
+ message: string;
2120
+ status: number;
2121
+ statusText: string;
2122
+ };
2123
+ }>;
2124
+ };
2125
+ $Infer: {
2126
+ Passkey: _better_auth_passkey0.Passkey;
2127
+ };
2128
+ } & {
2129
+ useSession: () => {
2130
+ data: {
2131
+ user: {
2132
+ id: string;
2133
+ createdAt: Date;
2134
+ updatedAt: Date;
2135
+ email: string;
2136
+ emailVerified: boolean;
2137
+ name: string;
2138
+ image?: string | null | undefined;
2139
+ banned: boolean | null | undefined;
2140
+ role?: string | null | undefined;
2141
+ banReason?: string | null | undefined;
2142
+ banExpires?: Date | null | undefined;
2143
+ twoFactorEnabled: boolean | null | undefined;
2144
+ phoneNumber?: string | null | undefined;
2145
+ phoneNumberVerified?: boolean | null | undefined;
2146
+ username?: string | null | undefined;
2147
+ displayUsername?: string | null | undefined;
2148
+ isAnonymous: boolean | null | undefined;
2149
+ };
2150
+ session: {
2151
+ id: string;
2152
+ createdAt: Date;
2153
+ updatedAt: Date;
2154
+ userId: string;
2155
+ expiresAt: Date;
2156
+ token: string;
2157
+ ipAddress?: string | null | undefined;
2158
+ userAgent?: string | null | undefined;
2159
+ impersonatedBy?: string | null | undefined;
2160
+ };
2161
+ } | null;
2162
+ isPending: boolean;
2163
+ isRefetching: boolean;
2164
+ error: better_auth_react0.BetterFetchError | null;
2165
+ refetch: (queryParams?: {
2166
+ query?: better_auth0.SessionQueryParams;
2167
+ } | undefined) => Promise<void>;
2168
+ };
2169
+ $Infer: {
2170
+ Session: {
2171
+ user: {
2172
+ id: string;
2173
+ createdAt: Date;
2174
+ updatedAt: Date;
2175
+ email: string;
2176
+ emailVerified: boolean;
2177
+ name: string;
2178
+ image?: string | null | undefined;
2179
+ banned: boolean | null | undefined;
2180
+ role?: string | null | undefined;
2181
+ banReason?: string | null | undefined;
2182
+ banExpires?: Date | null | undefined;
2183
+ twoFactorEnabled: boolean | null | undefined;
2184
+ phoneNumber?: string | null | undefined;
2185
+ phoneNumberVerified?: boolean | null | undefined;
2186
+ username?: string | null | undefined;
2187
+ displayUsername?: string | null | undefined;
2188
+ isAnonymous: boolean | null | undefined;
2189
+ };
2190
+ session: {
2191
+ id: string;
2192
+ createdAt: Date;
2193
+ updatedAt: Date;
2194
+ userId: string;
2195
+ expiresAt: Date;
2196
+ token: string;
2197
+ ipAddress?: string | null | undefined;
2198
+ userAgent?: string | null | undefined;
2199
+ impersonatedBy?: string | null | undefined;
2200
+ };
2201
+ };
2202
+ };
2203
+ $fetch: better_auth_react0.BetterFetch<{
2204
+ plugins: (better_auth_react0.BetterFetchPlugin<Record<string, any>> | {
2205
+ id: string;
2206
+ name: string;
2207
+ hooks: {
2208
+ onSuccess(context: better_auth_react0.SuccessContext<any>): void;
2209
+ };
2210
+ } | {
2211
+ id: string;
2212
+ name: string;
2213
+ hooks: {
2214
+ onSuccess: ((context: better_auth_react0.SuccessContext<any>) => Promise<void> | void) | undefined;
2215
+ onError: ((context: better_auth_react0.ErrorContext) => Promise<void> | void) | undefined;
2216
+ onRequest: (<T_1 extends Record<string, any>>(context: better_auth_react0.RequestContext<T_1>) => Promise<better_auth_react0.RequestContext | void> | better_auth_react0.RequestContext | void) | undefined;
2217
+ onResponse: ((context: better_auth_react0.ResponseContext) => Promise<Response | void | better_auth_react0.ResponseContext> | Response | better_auth_react0.ResponseContext | void) | undefined;
2218
+ };
2219
+ })[];
2220
+ cache?: RequestCache | undefined;
2221
+ method: string;
2222
+ headers?: (HeadersInit & (HeadersInit | {
2223
+ accept: "application/json" | "text/plain" | "application/octet-stream";
2224
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2225
+ authorization: "Bearer" | "Basic";
2226
+ })) | undefined;
2227
+ redirect?: RequestRedirect | undefined;
2228
+ credentials?: RequestCredentials;
2229
+ integrity?: string | undefined;
2230
+ keepalive?: boolean | undefined;
2231
+ mode?: RequestMode | undefined;
2232
+ priority?: RequestPriority | undefined;
2233
+ referrer?: string | undefined;
2234
+ referrerPolicy?: ReferrerPolicy | undefined;
2235
+ signal?: (AbortSignal | null) | undefined;
2236
+ window?: null | undefined;
2237
+ onRetry?: ((response: better_auth_react0.ResponseContext) => Promise<void> | void) | undefined;
2238
+ hookOptions?: {
2239
+ cloneResponse?: boolean;
2240
+ } | undefined;
2241
+ timeout?: number | undefined;
2242
+ customFetchImpl: better_auth_react0.FetchEsque;
2243
+ baseURL: string;
2244
+ throw?: boolean | undefined;
2245
+ auth?: ({
2246
+ type: "Bearer";
2247
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
2248
+ } | {
2249
+ type: "Basic";
2250
+ username: string | (() => string | undefined) | undefined;
2251
+ password: string | (() => string | undefined) | undefined;
2252
+ } | {
2253
+ type: "Custom";
2254
+ prefix: string | (() => string | undefined) | undefined;
2255
+ value: string | (() => string | undefined) | undefined;
2256
+ }) | undefined;
2257
+ body?: any;
2258
+ query?: any;
2259
+ params?: any;
2260
+ duplex?: "full" | "half" | undefined;
2261
+ jsonParser: (text: string) => Promise<any> | any;
2262
+ retry?: better_auth_react0.RetryOptions | undefined;
2263
+ retryAttempt?: number | undefined;
2264
+ output?: (better_auth_react0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
2265
+ errorSchema?: better_auth_react0.StandardSchemaV1 | undefined;
2266
+ disableValidation?: boolean | undefined;
2267
+ disableSignal?: boolean | undefined;
2268
+ }, unknown, unknown, {}>;
2269
+ $store: {
2270
+ notify: (signal?: (Omit<string, "$sessionSignal"> | "$sessionSignal") | undefined) => void;
2271
+ listen: (signal: Omit<string, "$sessionSignal"> | "$sessionSignal", listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
2272
+ atoms: Record<string, better_auth_react0.WritableAtom<any>>;
2273
+ };
2274
+ $ERROR_CODES: {
2275
+ readonly FAILED_TO_CREATE_USER: "Failed to create user";
2276
+ readonly USER_ALREADY_EXISTS: "User already exists.";
2277
+ readonly USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: "User already exists. Use another email.";
2278
+ readonly YOU_CANNOT_BAN_YOURSELF: "You cannot ban yourself";
2279
+ readonly YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE: "You are not allowed to change users role";
2280
+ readonly YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS: "You are not allowed to create users";
2281
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS: "You are not allowed to list users";
2282
+ readonly YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS: "You are not allowed to list users sessions";
2283
+ readonly YOU_ARE_NOT_ALLOWED_TO_BAN_USERS: "You are not allowed to ban users";
2284
+ readonly YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS: "You are not allowed to impersonate users";
2285
+ readonly YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS: "You are not allowed to revoke users sessions";
2286
+ readonly YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS: "You are not allowed to delete users";
2287
+ readonly YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD: "You are not allowed to set users password";
2288
+ readonly BANNED_USER: "You have been banned from this application";
2289
+ readonly YOU_ARE_NOT_ALLOWED_TO_GET_USER: "You are not allowed to get user";
2290
+ readonly NO_DATA_TO_UPDATE: "No data to update";
2291
+ readonly YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS: "You are not allowed to update users";
2292
+ readonly YOU_CANNOT_REMOVE_YOURSELF: "You cannot remove yourself";
2293
+ readonly YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE: "You are not allowed to set a non-existent role value";
2294
+ readonly YOU_CANNOT_IMPERSONATE_ADMINS: "You cannot impersonate admins";
2295
+ readonly INVALID_ROLE_TYPE: "Invalid role type";
2296
+ readonly INVALID_METADATA_TYPE: "metadata must be an object or undefined";
2297
+ readonly REFILL_AMOUNT_AND_INTERVAL_REQUIRED: "refillAmount is required when refillInterval is provided";
2298
+ readonly REFILL_INTERVAL_AND_AMOUNT_REQUIRED: "refillInterval is required when refillAmount is provided";
2299
+ readonly USER_BANNED: "User is banned";
2300
+ readonly UNAUTHORIZED_SESSION: "Unauthorized or invalid session";
2301
+ readonly KEY_NOT_FOUND: "API Key not found";
2302
+ readonly KEY_DISABLED: "API Key is disabled";
2303
+ readonly KEY_EXPIRED: "API Key has expired";
2304
+ readonly USAGE_EXCEEDED: "API Key has reached its usage limit";
2305
+ readonly KEY_NOT_RECOVERABLE: "API Key is not recoverable";
2306
+ readonly EXPIRES_IN_IS_TOO_SMALL: "The expiresIn is smaller than the predefined minimum value.";
2307
+ readonly EXPIRES_IN_IS_TOO_LARGE: "The expiresIn is larger than the predefined maximum value.";
2308
+ readonly INVALID_REMAINING: "The remaining count is either too large or too small.";
2309
+ readonly INVALID_PREFIX_LENGTH: "The prefix length is either too large or too small.";
2310
+ readonly INVALID_NAME_LENGTH: "The name length is either too large or too small.";
2311
+ readonly METADATA_DISABLED: "Metadata is disabled.";
2312
+ readonly RATE_LIMIT_EXCEEDED: "Rate limit exceeded.";
2313
+ readonly NO_VALUES_TO_UPDATE: "No values to update.";
2314
+ readonly KEY_DISABLED_EXPIRATION: "Custom key expiration values are disabled.";
2315
+ readonly INVALID_API_KEY: "Invalid API key.";
2316
+ readonly INVALID_USER_ID_FROM_API_KEY: "The user id from the API key is invalid.";
2317
+ readonly INVALID_API_KEY_GETTER_RETURN_TYPE: "API Key getter returned an invalid key type. Expected string.";
2318
+ readonly SERVER_ONLY_PROPERTY: "The property you're trying to set can only be set from the server auth instance only.";
2319
+ readonly FAILED_TO_UPDATE_API_KEY: "Failed to update API key";
2320
+ readonly NAME_REQUIRED: "API Key name is required.";
2321
+ readonly OTP_NOT_ENABLED: "OTP not enabled";
2322
+ readonly OTP_HAS_EXPIRED: "OTP has expired";
2323
+ readonly TOTP_NOT_ENABLED: "TOTP not enabled";
2324
+ readonly TWO_FACTOR_NOT_ENABLED: "Two factor isn't enabled";
2325
+ readonly BACKUP_CODES_NOT_ENABLED: "Backup codes aren't enabled";
2326
+ readonly INVALID_BACKUP_CODE: "Invalid backup code";
2327
+ readonly INVALID_CODE: "Invalid code";
2328
+ readonly TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE: "Too many attempts. Please request a new code.";
2329
+ readonly INVALID_TWO_FACTOR_COOKIE: "Invalid two factor cookie";
2330
+ readonly CHALLENGE_NOT_FOUND: "Challenge not found";
2331
+ readonly YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY: "You are not allowed to register this passkey";
2332
+ readonly FAILED_TO_VERIFY_REGISTRATION: "Failed to verify registration";
2333
+ readonly PASSKEY_NOT_FOUND: "Passkey not found";
2334
+ readonly AUTHENTICATION_FAILED: "Authentication failed";
2335
+ readonly UNABLE_TO_CREATE_SESSION: "Unable to create session";
2336
+ readonly FAILED_TO_UPDATE_PASSKEY: "Failed to update passkey";
2337
+ readonly INVALID_PHONE_NUMBER: "Invalid phone number";
2338
+ readonly PHONE_NUMBER_EXIST: "Phone number already exists";
2339
+ readonly PHONE_NUMBER_NOT_EXIST: "phone number isn't registered";
2340
+ readonly INVALID_PHONE_NUMBER_OR_PASSWORD: "Invalid phone number or password";
2341
+ readonly UNEXPECTED_ERROR: "Unexpected error";
2342
+ readonly OTP_NOT_FOUND: "OTP not found";
2343
+ readonly OTP_EXPIRED: "OTP expired";
2344
+ readonly INVALID_OTP: "Invalid OTP";
2345
+ readonly PHONE_NUMBER_NOT_VERIFIED: "Phone number not verified";
2346
+ readonly PHONE_NUMBER_CANNOT_BE_UPDATED: "Phone number cannot be updated";
2347
+ readonly SEND_OTP_NOT_IMPLEMENTED: "sendOTP not implemented";
2348
+ readonly TOO_MANY_ATTEMPTS: "Too many attempts";
2349
+ readonly INVALID_USERNAME_OR_PASSWORD: "Invalid username or password";
2350
+ readonly EMAIL_NOT_VERIFIED: "Email not verified";
2351
+ readonly USERNAME_IS_ALREADY_TAKEN: "Username is already taken. Please try another.";
2352
+ readonly USERNAME_TOO_SHORT: "Username is too short";
2353
+ readonly USERNAME_TOO_LONG: "Username is too long";
2354
+ readonly INVALID_USERNAME: "Username is invalid";
2355
+ readonly INVALID_DISPLAY_USERNAME: "Display username is invalid";
2356
+ readonly INVALID_EMAIL_FORMAT: "Email was not generated in a valid format";
2357
+ readonly COULD_NOT_CREATE_SESSION: "Could not create session";
2358
+ readonly ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY: "Anonymous users cannot sign in again anonymously";
2359
+ readonly INVALID_SESSION_TOKEN: "Invalid session token";
2360
+ readonly USER_NOT_FOUND: "User not found";
2361
+ readonly FAILED_TO_CREATE_SESSION: "Failed to create session";
2362
+ readonly FAILED_TO_UPDATE_USER: "Failed to update user";
2363
+ readonly FAILED_TO_GET_SESSION: "Failed to get session";
2364
+ readonly INVALID_PASSWORD: "Invalid password";
2365
+ readonly INVALID_EMAIL: "Invalid email";
2366
+ readonly INVALID_EMAIL_OR_PASSWORD: "Invalid email or password";
2367
+ readonly SOCIAL_ACCOUNT_ALREADY_LINKED: "Social account already linked";
2368
+ readonly PROVIDER_NOT_FOUND: "Provider not found";
2369
+ readonly INVALID_TOKEN: "Invalid token";
2370
+ readonly ID_TOKEN_NOT_SUPPORTED: "id_token not supported";
2371
+ readonly FAILED_TO_GET_USER_INFO: "Failed to get user info";
2372
+ readonly USER_EMAIL_NOT_FOUND: "User email not found";
2373
+ readonly PASSWORD_TOO_SHORT: "Password too short";
2374
+ readonly PASSWORD_TOO_LONG: "Password too long";
2375
+ readonly EMAIL_CAN_NOT_BE_UPDATED: "Email can not be updated";
2376
+ readonly CREDENTIAL_ACCOUNT_NOT_FOUND: "Credential account not found";
2377
+ readonly SESSION_EXPIRED: "Session expired. Re-authenticate to perform this action.";
2378
+ readonly FAILED_TO_UNLINK_LAST_ACCOUNT: "You can't unlink your last account";
2379
+ readonly ACCOUNT_NOT_FOUND: "Account not found";
2380
+ readonly USER_ALREADY_HAS_PASSWORD: "User already has a password. Provide that to delete the account.";
2381
+ };
2382
+ };
2383
+ features: AuthFeatures;
2384
+ };
2385
+ /** Return type of defineAuthClient */
2386
+ type DefineAuthClientResult = ReturnType<typeof defineAuthClient>;
2387
+ //#endregion
2388
+ export { AUTH_BASE_PATH, AUTH_BASE_URL, AuthFeatures, DefineAuthClientOptions, DefineAuthClientResult, defineAuthClient, defineAuthFeatures };