faire-auth 1.0.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 (221) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +34 -0
  3. package/dist/access-B5bBI4uT.mjs +39 -0
  4. package/dist/access-Crt-IJ2P.cjs +51 -0
  5. package/dist/adapter-factory-BXei1QRX.mjs +881 -0
  6. package/dist/adapter-factory-DT-_2aHJ.cjs +893 -0
  7. package/dist/adapters/drizzle-adapter/index.cjs +208 -0
  8. package/dist/adapters/drizzle-adapter/index.d.cts +48 -0
  9. package/dist/adapters/drizzle-adapter/index.d.mts +48 -0
  10. package/dist/adapters/drizzle-adapter/index.mjs +207 -0
  11. package/dist/adapters/index.cjs +23 -0
  12. package/dist/adapters/index.d.cts +157 -0
  13. package/dist/adapters/index.d.mts +157 -0
  14. package/dist/adapters/index.mjs +17 -0
  15. package/dist/adapters/kysely-adapter/index.cjs +11 -0
  16. package/dist/adapters/kysely-adapter/index.d.cts +52 -0
  17. package/dist/adapters/kysely-adapter/index.d.mts +52 -0
  18. package/dist/adapters/kysely-adapter/index.mjs +9 -0
  19. package/dist/adapters/memory-adapter/index.cjs +9 -0
  20. package/dist/adapters/memory-adapter/index.d.cts +15 -0
  21. package/dist/adapters/memory-adapter/index.d.mts +15 -0
  22. package/dist/adapters/memory-adapter/index.mjs +9 -0
  23. package/dist/adapters/mongodb-adapter/index.cjs +9 -0
  24. package/dist/adapters/mongodb-adapter/index.d.cts +4 -0
  25. package/dist/adapters/mongodb-adapter/index.d.mts +4 -0
  26. package/dist/adapters/mongodb-adapter/index.mjs +9 -0
  27. package/dist/adapters/prisma-adapter/index.cjs +156 -0
  28. package/dist/adapters/prisma-adapter/index.d.cts +35 -0
  29. package/dist/adapters/prisma-adapter/index.d.mts +35 -0
  30. package/dist/adapters/prisma-adapter/index.mjs +155 -0
  31. package/dist/adapters/test.cjs +797 -0
  32. package/dist/adapters/test.d.cts +82 -0
  33. package/dist/adapters/test.d.mts +82 -0
  34. package/dist/adapters/test.mjs +793 -0
  35. package/dist/api/index.cjs +20 -0
  36. package/dist/api/index.d.cts +3 -0
  37. package/dist/api/index.d.mts +3 -0
  38. package/dist/api/index.mjs +20 -0
  39. package/dist/api/middleware/index.cjs +16 -0
  40. package/dist/api/middleware/index.d.cts +16 -0
  41. package/dist/api/middleware/index.d.mts +16 -0
  42. package/dist/api/middleware/index.mjs +11 -0
  43. package/dist/api-Bm89BLgN.cjs +1899 -0
  44. package/dist/api-_B7qO28y.mjs +1892 -0
  45. package/dist/auth-Bo9PDt5j.cjs +739 -0
  46. package/dist/auth-Ds4AG4h4.mjs +709 -0
  47. package/dist/bearer-0SeEmaS4.mjs +54 -0
  48. package/dist/bearer-CHeREcGT.cjs +60 -0
  49. package/dist/bun-sqlite-dialect-CfkBo2v5.mjs +155 -0
  50. package/dist/bun-sqlite-dialect-wuaC2-gh.cjs +156 -0
  51. package/dist/chunk-Ceigfy4P.mjs +39 -0
  52. package/dist/chunk-oakRccI5.cjs +60 -0
  53. package/dist/client/index.cjs +22 -0
  54. package/dist/client/index.d.cts +8 -0
  55. package/dist/client/index.d.mts +8 -0
  56. package/dist/client/index.mjs +19 -0
  57. package/dist/client/lynx/index.cjs +79 -0
  58. package/dist/client/lynx/index.d.cts +156 -0
  59. package/dist/client/lynx/index.d.mts +156 -0
  60. package/dist/client/lynx/index.mjs +76 -0
  61. package/dist/client/plugins/index.cjs +11 -0
  62. package/dist/client/plugins/index.d.cts +17 -0
  63. package/dist/client/plugins/index.d.mts +17 -0
  64. package/dist/client/plugins/index.mjs +10 -0
  65. package/dist/client/react/index.cjs +79 -0
  66. package/dist/client/react/index.d.cts +156 -0
  67. package/dist/client/react/index.d.mts +156 -0
  68. package/dist/client/react/index.mjs +76 -0
  69. package/dist/client/solid/index.cjs +51 -0
  70. package/dist/client/solid/index.d.cts +90 -0
  71. package/dist/client/solid/index.d.mts +90 -0
  72. package/dist/client/solid/index.mjs +50 -0
  73. package/dist/client/svelte/index.cjs +28 -0
  74. package/dist/client/svelte/index.d.cts +110 -0
  75. package/dist/client/svelte/index.d.mts +110 -0
  76. package/dist/client/svelte/index.mjs +28 -0
  77. package/dist/client/vue/index.cjs +68 -0
  78. package/dist/client/vue/index.d.cts +123 -0
  79. package/dist/client/vue/index.d.mts +123 -0
  80. package/dist/client/vue/index.mjs +67 -0
  81. package/dist/cookies-B5xeA6i8.cjs +456 -0
  82. package/dist/cookies-Ch1JfQIz.mjs +367 -0
  83. package/dist/crypto/index.cjs +11 -0
  84. package/dist/crypto/index.d.cts +22 -0
  85. package/dist/crypto/index.d.mts +22 -0
  86. package/dist/crypto/index.mjs +5 -0
  87. package/dist/crypto-CcTxYH82.cjs +57 -0
  88. package/dist/crypto-CyQRFtkq.mjs +41 -0
  89. package/dist/db/index.cjs +40 -0
  90. package/dist/db/index.d.cts +4 -0
  91. package/dist/db/index.d.mts +4 -0
  92. package/dist/db/index.mjs +16 -0
  93. package/dist/db-BTKyYu-_.cjs +1180 -0
  94. package/dist/db-xiJtoDgz.mjs +1119 -0
  95. package/dist/defu-B0Svx_x4.cjs +34 -0
  96. package/dist/defu-SZkpHhbR.mjs +28 -0
  97. package/dist/email-verification-C-AsfJsb.cjs +247 -0
  98. package/dist/email-verification-CWhj2qfb.mjs +228 -0
  99. package/dist/hono-BEq1NYVX.cjs +526 -0
  100. package/dist/hono-Cdukwu5K.cjs +13 -0
  101. package/dist/hono-CoKYWnXA.mjs +7 -0
  102. package/dist/hono-Covz10jU.mjs +508 -0
  103. package/dist/hono-DOM31WQz.d.cts +18 -0
  104. package/dist/hono-DuE14mmj.d.mts +18 -0
  105. package/dist/index-B-WeOMzg.d.cts +13350 -0
  106. package/dist/index-B09P9p5_.d.cts +33 -0
  107. package/dist/index-B5_0QTLg.d.mts +3 -0
  108. package/dist/index-B7SKyR_a.d.cts +3 -0
  109. package/dist/index-BVHscLQl.d.cts +992 -0
  110. package/dist/index-C2-2QDyS.d.cts +35 -0
  111. package/dist/index-CTwrVluH.d.mts +41 -0
  112. package/dist/index-CWAqWfoZ.d.cts +27 -0
  113. package/dist/index-CYSShrFx.d.mts +27 -0
  114. package/dist/index-Qu-iJGNr.d.mts +992 -0
  115. package/dist/index-cs4Sh0En.d.cts +41 -0
  116. package/dist/index-jlessPI0.d.mts +13350 -0
  117. package/dist/index-ppgcFe12.d.mts +33 -0
  118. package/dist/index-to0RO38U.d.mts +35 -0
  119. package/dist/index.cjs +85 -0
  120. package/dist/index.d.cts +5 -0
  121. package/dist/index.d.mts +5 -0
  122. package/dist/index.mjs +27 -0
  123. package/dist/integrations/next-js.cjs +50 -0
  124. package/dist/integrations/next-js.d.cts +23 -0
  125. package/dist/integrations/next-js.d.mts +23 -0
  126. package/dist/integrations/next-js.mjs +49 -0
  127. package/dist/integrations/node.cjs +139 -0
  128. package/dist/integrations/node.d.cts +22 -0
  129. package/dist/integrations/node.d.mts +22 -0
  130. package/dist/integrations/node.mjs +134 -0
  131. package/dist/integrations/react-start.cjs +37 -0
  132. package/dist/integrations/react-start.d.cts +17 -0
  133. package/dist/integrations/react-start.d.mts +17 -0
  134. package/dist/integrations/react-start.mjs +37 -0
  135. package/dist/integrations/solid-start.cjs +14 -0
  136. package/dist/integrations/solid-start.d.cts +13 -0
  137. package/dist/integrations/solid-start.d.mts +13 -0
  138. package/dist/integrations/solid-start.mjs +13 -0
  139. package/dist/integrations/svelte-kit.cjs +52 -0
  140. package/dist/integrations/svelte-kit.d.cts +42 -0
  141. package/dist/integrations/svelte-kit.d.mts +42 -0
  142. package/dist/integrations/svelte-kit.mjs +49 -0
  143. package/dist/ip-B5SwXaMB.cjs +54 -0
  144. package/dist/ip-BjNYspCH.mjs +36 -0
  145. package/dist/json-B1v2qRTQ.mjs +24 -0
  146. package/dist/json-CcJ2HjGo.cjs +30 -0
  147. package/dist/kysely-adapter-Bxi7sPdG.cjs +288 -0
  148. package/dist/kysely-adapter-DRuoT_X8.mjs +270 -0
  149. package/dist/logged-CyGfp8_H.mjs +187 -0
  150. package/dist/logged-DQK3C64b.cjs +193 -0
  151. package/dist/memory-adapter-BlnDIAAX.cjs +154 -0
  152. package/dist/memory-adapter-Db3tsJTn.mjs +148 -0
  153. package/dist/middleware-CE6OhDkq.mjs +29 -0
  154. package/dist/middleware-CWvRH4EW.cjs +47 -0
  155. package/dist/mongodb-adapter-C_qGQED5.mjs +291 -0
  156. package/dist/mongodb-adapter-C_qfK87x.cjs +297 -0
  157. package/dist/node-sqlite-dialect-BfBzyOAg.mjs +155 -0
  158. package/dist/node-sqlite-dialect-mJWC8LWQ.cjs +156 -0
  159. package/dist/oauth2/index.cjs +25 -0
  160. package/dist/oauth2/index.d.cts +42 -0
  161. package/dist/oauth2/index.d.mts +42 -0
  162. package/dist/oauth2/index.mjs +16 -0
  163. package/dist/oauth2-B8M0lW9l.mjs +159 -0
  164. package/dist/oauth2-BLeOEi7Y.cjs +177 -0
  165. package/dist/origin-check-8Gajklvh.mjs +228 -0
  166. package/dist/origin-check-id9lTnqZ.cjs +246 -0
  167. package/dist/parser-CdncAl9i.cjs +83 -0
  168. package/dist/parser-CeAer-RM.mjs +71 -0
  169. package/dist/passkey-B6N20LSS.cjs +512 -0
  170. package/dist/passkey-DJsR_GX3.mjs +505 -0
  171. package/dist/plugins/access/index.cjs +4 -0
  172. package/dist/plugins/access/index.d.cts +2 -0
  173. package/dist/plugins/access/index.d.mts +2 -0
  174. package/dist/plugins/access/index.mjs +3 -0
  175. package/dist/plugins/bearer/index.cjs +7 -0
  176. package/dist/plugins/bearer/index.d.cts +4 -0
  177. package/dist/plugins/bearer/index.d.mts +4 -0
  178. package/dist/plugins/bearer/index.mjs +7 -0
  179. package/dist/plugins/index.cjs +49 -0
  180. package/dist/plugins/index.d.cts +9326 -0
  181. package/dist/plugins/index.d.mts +9326 -0
  182. package/dist/plugins/index.mjs +26 -0
  183. package/dist/plugins/passkey/index.cjs +15 -0
  184. package/dist/plugins/passkey/index.d.cts +4 -0
  185. package/dist/plugins/passkey/index.d.mts +4 -0
  186. package/dist/plugins/passkey/index.mjs +15 -0
  187. package/dist/plugins-C1lm2Wj3.cjs +5254 -0
  188. package/dist/plugins-Dai1QkRU.mjs +5199 -0
  189. package/dist/request-1NL_1lyJ.mjs +58 -0
  190. package/dist/request-CPNlp-DK.cjs +100 -0
  191. package/dist/schema-D-qjygfE.cjs +179 -0
  192. package/dist/schema-DTIwLLmf.mjs +125 -0
  193. package/dist/session-De9POJTW.cjs +641 -0
  194. package/dist/session-rH8ougDl.mjs +538 -0
  195. package/dist/social-providers/index.cjs +10 -0
  196. package/dist/social-providers/index.d.cts +2 -0
  197. package/dist/social-providers/index.d.mts +2 -0
  198. package/dist/social-providers/index.mjs +5 -0
  199. package/dist/social-providers-DcFNUT0S.cjs +13 -0
  200. package/dist/social-providers-DoYJhBe3.mjs +9 -0
  201. package/dist/state--f7fwIGh.cjs +99 -0
  202. package/dist/state-CqJfCIl9.mjs +86 -0
  203. package/dist/test-utils/index.cjs +27492 -0
  204. package/dist/test-utils/index.d.cts +4584 -0
  205. package/dist/test-utils/index.d.mts +4584 -0
  206. package/dist/test-utils/index.mjs +27490 -0
  207. package/dist/types/index.cjs +0 -0
  208. package/dist/types/index.d.cts +3 -0
  209. package/dist/types/index.d.mts +3 -0
  210. package/dist/types/index.mjs +1 -0
  211. package/dist/url-BoUuoIwZ.mjs +88 -0
  212. package/dist/url-D2yvKaM7.cjs +118 -0
  213. package/dist/utils/cookies.cjs +51 -0
  214. package/dist/utils/cookies.d.cts +179 -0
  215. package/dist/utils/cookies.d.mts +179 -0
  216. package/dist/utils/cookies.mjs +7 -0
  217. package/dist/utils-44aDDP8f.cjs +2 -0
  218. package/dist/utils-D4vZd1-9.mjs +4 -0
  219. package/dist/vanilla-Bu2PmFzE.cjs +30 -0
  220. package/dist/vanilla-TfHqeiC7.mjs +25 -0
  221. package/package.json +470 -0
@@ -0,0 +1,4584 @@
1
+ import { H as InferApp, I as FaireAuthOptions$1, U as InferClient, V as InferAPI, Y as InferResolvedHooks, an as AuthContext$1, et as ClientOptions, ht as FetchOptions, it as InferActions, m as router, st as InferErrorCodes } from "../index-B-WeOMzg.cjs";
2
+ import { t as ContextVars } from "../hono-DOM31WQz.cjs";
3
+ import "../index-C2-2QDyS.cjs";
4
+ import "../index-CWAqWfoZ.cjs";
5
+ import "../index-B7SKyR_a.cjs";
6
+ import * as _faire_auth_core_types76 from "@faire-auth/core/types";
7
+ import { AnyHono, AuthRouteConfig, RouteConfigToEnv, RouteHandler } from "@faire-auth/core/types";
8
+ import * as hono114 from "hono";
9
+ import * as _faire_auth_core_db12 from "@faire-auth/core/db";
10
+ import * as hono_utils_types89 from "hono/utils/types";
11
+ import * as _faire_auth_core_social_providers25 from "@faire-auth/core/social-providers";
12
+ import * as _faire_auth_core_error0 from "@faire-auth/core/error";
13
+ import { z } from "zod";
14
+ import { Definitions } from "@faire-auth/core/static";
15
+ import * as _better_fetch_fetch49 from "@better-fetch/fetch";
16
+ import { SuccessContext } from "@better-fetch/fetch";
17
+ import * as nanostores11 from "nanostores";
18
+ import * as kysely0 from "kysely";
19
+ import { Kysely } from "kysely";
20
+ import * as type_fest0 from "type-fest";
21
+ import { SetRequired } from "type-fest";
22
+
23
+ //#region src/test-utils/test-endpoint.d.ts
24
+ declare const createTestEndpoint: <C extends AuthRouteConfig, H extends (options: FaireAuthOptions$1) => RouteHandler<C, RouteConfigToEnv<C> & ContextVars>, O extends SetRequired<FaireAuthOptions$1, "baseURL"> = {
25
+ baseURL: string;
26
+ }>(c: C, h: H, o?: {
27
+ options?: O;
28
+ builtSchemas?: Record<Definitions, z.ZodType>;
29
+ context?: AuthContext$1;
30
+ }) => {
31
+ config: _faire_auth_core_types76.ProcessRouteConfig<C, FaireAuthOptions$1>;
32
+ handler: RouteHandler<_faire_auth_core_types76.ProcessRouteConfig<C, FaireAuthOptions$1>, hono114.Env extends RouteConfigToEnv<_faire_auth_core_types76.ProcessRouteConfig<C, FaireAuthOptions$1>> ? ContextVars : RouteConfigToEnv<_faire_auth_core_types76.ProcessRouteConfig<C, FaireAuthOptions$1>> & ContextVars>;
33
+ execute: <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(...args: _faire_auth_core_types76.CustomIO<_faire_auth_core_types76.ProcessRouteConfig<C, FaireAuthOptions$1>, "in"> extends undefined ? [ctx?: hono114.Context<ContextVars<any>, any, {}> | _faire_auth_core_types76.ExecOpts<AsResponse, ReturnHeaders>] : [input: _faire_auth_core_types76.CustomIO<_faire_auth_core_types76.ProcessRouteConfig<C, FaireAuthOptions$1>, "in"> & {}, ctx?: hono114.Context<ContextVars<any>, any, {}> | _faire_auth_core_types76.ExecOpts<AsResponse, ReturnHeaders>]) => Promise<AsResponse extends true ? Response : ReturnHeaders extends true ? {
34
+ headers: Headers;
35
+ response: _faire_auth_core_types76.ExecRet<_faire_auth_core_types76.ProcessRouteConfig<C, FaireAuthOptions$1>>;
36
+ } : _faire_auth_core_types76.ExecRet<_faire_auth_core_types76.ProcessRouteConfig<C, FaireAuthOptions$1>>>;
37
+ };
38
+ //#endregion
39
+ //#region src/test-utils/test-database.d.ts
40
+ type TestDatabaseType = "sqlite" | "postgres" | "mysql" | "mongodb";
41
+ //#endregion
42
+ //#region src/test-utils/test-instance.d.ts
43
+ interface TestUser {
44
+ [x: string]: unknown;
45
+ email: string;
46
+ password: string;
47
+ name: string;
48
+ image?: string | null;
49
+ }
50
+ interface CreatedTestUser extends TestUser {
51
+ id: string;
52
+ emailVerified: boolean;
53
+ createdAt: Date;
54
+ updatedAt: Date;
55
+ }
56
+ interface SignInResult {
57
+ token: string;
58
+ user: CreatedTestUser;
59
+ headers: Headers;
60
+ setCookie: (name: string, value: string) => void;
61
+ captureCookies: (callback?: (cookieMap: Map<string, string>) => void) => <Res = {}>(context: SuccessContext<Res> | {
62
+ response: Response;
63
+ }) => void;
64
+ }
65
+ interface RepeatableSignInResult extends SignInResult {
66
+ signIn: () => Promise<SignInResult>;
67
+ }
68
+ declare const getTestInstance: <O extends FaireAuthOptions$1, C extends ClientOptions, DisableTestUser extends boolean = false>(overrideOptions?: O, {
69
+ clientOptions,
70
+ port,
71
+ disableTestUser,
72
+ testUser,
73
+ testWith
74
+ }?: {
75
+ clientOptions?: C;
76
+ port?: number;
77
+ disableTestUser?: DisableTestUser;
78
+ testUser?: Partial<TestUser>;
79
+ testWith?: TestDatabaseType;
80
+ }) => Promise<{
81
+ auth: {
82
+ options: O extends undefined ? {
83
+ baseURL: string;
84
+ basePath: string;
85
+ secret: string;
86
+ socialProviders: {
87
+ github: {
88
+ clientId: string;
89
+ clientSecret: string;
90
+ };
91
+ google: {
92
+ clientId: string;
93
+ clientSecret: string;
94
+ };
95
+ };
96
+ emailAndPassword: {
97
+ enabled: true;
98
+ };
99
+ rateLimit: {
100
+ enabled: false;
101
+ };
102
+ advanced: {
103
+ disableCSRFCheck: true;
104
+ };
105
+ logger: {
106
+ level: "debug";
107
+ };
108
+ plugins: {
109
+ id: "bearer";
110
+ hooks: {
111
+ before: {
112
+ matcher: (ctx: hono114.Context<ContextVars<any>, any, {}>) => boolean;
113
+ handler: (_opts: _faire_auth_core_types76.FaireAuthOptions<any>) => (ctx: hono114.Context<ContextVars<object>, string, {}>) => Promise<void>;
114
+ }[];
115
+ after: {
116
+ matcher: (_ctx: hono114.Context<ContextVars<any>, any, {}>) => true;
117
+ handler: (_opts: _faire_auth_core_types76.FaireAuthOptions<any>) => (ctx: hono114.Context<ContextVars<object>, string, {}>) => Promise<void>;
118
+ }[];
119
+ };
120
+ }[];
121
+ database: kysely0.SqliteDatabase | ((options: FaireAuthOptions$1) => _faire_auth_core_db12.DBAdapter<FaireAuthOptions$1>) | {
122
+ db: kysely0.Kysely<any>;
123
+ type: "postgres";
124
+ } | {
125
+ db: kysely0.Kysely<any>;
126
+ type: "mysql";
127
+ };
128
+ } : {} & type_fest0.PickIndexSignature<O> & (type_fest0.OmitIndexSignature<{
129
+ baseURL: string;
130
+ basePath: string;
131
+ secret: string;
132
+ socialProviders: {
133
+ github: {
134
+ clientId: string;
135
+ clientSecret: string;
136
+ };
137
+ google: {
138
+ clientId: string;
139
+ clientSecret: string;
140
+ };
141
+ };
142
+ emailAndPassword: {
143
+ enabled: true;
144
+ };
145
+ rateLimit: {
146
+ enabled: false;
147
+ };
148
+ advanced: {
149
+ disableCSRFCheck: true;
150
+ };
151
+ logger: {
152
+ level: "debug";
153
+ };
154
+ plugins: {
155
+ id: "bearer";
156
+ hooks: {
157
+ before: {
158
+ matcher: (ctx: hono114.Context<ContextVars<any>, any, {}>) => boolean;
159
+ handler: (_opts: _faire_auth_core_types76.FaireAuthOptions<any>) => (ctx: hono114.Context<ContextVars<object>, string, {}>) => Promise<void>;
160
+ }[];
161
+ after: {
162
+ matcher: (_ctx: hono114.Context<ContextVars<any>, any, {}>) => true;
163
+ handler: (_opts: _faire_auth_core_types76.FaireAuthOptions<any>) => (ctx: hono114.Context<ContextVars<object>, string, {}>) => Promise<void>;
164
+ }[];
165
+ };
166
+ }[];
167
+ database: kysely0.SqliteDatabase | ((options: FaireAuthOptions$1) => _faire_auth_core_db12.DBAdapter<FaireAuthOptions$1>) | {
168
+ db: kysely0.Kysely<any>;
169
+ type: "postgres";
170
+ } | {
171
+ db: kysely0.Kysely<any>;
172
+ type: "mysql";
173
+ };
174
+ }> extends infer T_1 ? { [Key in keyof T_1 as Key extends keyof type_fest0.OmitIndexSignature<O> ? never : Key]: T_1[Key] } : never) & type_fest0.OmitIndexSignature<O> extends infer T ? { [KeyType in keyof T]: T[KeyType] } : never;
175
+ handler: (request: Request, Env?: any, executionCtx?: hono114.ExecutionContext) => Promise<Response> | Response;
176
+ app: ReturnType<typeof router>["app"];
177
+ api: ReturnType<typeof router>["api"];
178
+ $context: AuthContext$1<FaireAuthOptions$1>;
179
+ $Infer: {
180
+ Session: unknown;
181
+ App: unknown;
182
+ Api: unknown;
183
+ };
184
+ $ERROR_CODES: typeof _faire_auth_core_error0.BASE_ERROR_CODES;
185
+ };
186
+ client: _faire_auth_core_types76.UnionToIntersection<InferResolvedHooks<(C extends undefined ? {} : C) & {
187
+ baseURL: string;
188
+ fetchOptions: {
189
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
190
+ };
191
+ }>> & {
192
+ changeEmail: {
193
+ $post: <O_1 extends FetchOptions<unknown, {
194
+ newEmail: string;
195
+ callbackURL?: string | undefined;
196
+ }, any, any, {
197
+ success: true;
198
+ message?: string | undefined;
199
+ }>>(args: {
200
+ json: {
201
+ newEmail: string;
202
+ callbackURL?: string | undefined;
203
+ };
204
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
205
+ baseURL: string;
206
+ fetchOptions: {
207
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
208
+ };
209
+ })["fetchOptions"] extends {
210
+ throw: true;
211
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
212
+ baseURL: string;
213
+ fetchOptions: {
214
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
215
+ };
216
+ })["fetchOptions"] extends {
217
+ throw: true;
218
+ } ? true : false) ? T_2 extends true ? never : {
219
+ data: null;
220
+ error: {
221
+ success: false;
222
+ code?: string | undefined | undefined;
223
+ message?: string | undefined | undefined;
224
+ status: 401;
225
+ statusText: string;
226
+ };
227
+ } : never : never) | ((((C extends undefined ? {} : C) & {
228
+ baseURL: string;
229
+ fetchOptions: {
230
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
231
+ };
232
+ })["fetchOptions"] extends {
233
+ throw: true;
234
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
235
+ baseURL: string;
236
+ fetchOptions: {
237
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
238
+ };
239
+ })["fetchOptions"] extends {
240
+ throw: true;
241
+ } ? true : false) ? T_3 extends true ? never : {
242
+ data: null;
243
+ error: {
244
+ success: false;
245
+ code?: string | undefined;
246
+ message?: string | undefined;
247
+ status: 400;
248
+ statusText: string;
249
+ };
250
+ } : never : never) | ((((C extends undefined ? {} : C) & {
251
+ baseURL: string;
252
+ fetchOptions: {
253
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
254
+ };
255
+ })["fetchOptions"] extends {
256
+ throw: true;
257
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
258
+ baseURL: string;
259
+ fetchOptions: {
260
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
261
+ };
262
+ })["fetchOptions"] extends {
263
+ throw: true;
264
+ } ? true : false) ? T_4 extends true ? {
265
+ success: true;
266
+ message?: string | undefined;
267
+ } : {
268
+ data: {
269
+ success: true;
270
+ message?: string | undefined;
271
+ };
272
+ error: null;
273
+ } : never : never) | ((((C extends undefined ? {} : C) & {
274
+ baseURL: string;
275
+ fetchOptions: {
276
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
277
+ };
278
+ })["fetchOptions"] extends {
279
+ throw: true;
280
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
281
+ baseURL: string;
282
+ fetchOptions: {
283
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
284
+ };
285
+ })["fetchOptions"] extends {
286
+ throw: true;
287
+ } ? true : false) ? T_5 extends true ? never : {
288
+ data: null;
289
+ error: {
290
+ success: false;
291
+ errors: string[];
292
+ properties?: {
293
+ newEmail?: {
294
+ errors: string[];
295
+ } | undefined;
296
+ callbackURL?: {
297
+ errors: string[];
298
+ } | undefined;
299
+ } | undefined;
300
+ status: 422;
301
+ statusText: string;
302
+ };
303
+ } : never : never)>;
304
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
305
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
306
+ param: infer Param;
307
+ } ? "/api/auth/change-email" : "/api/auth/change-email"}${Arg extends {
308
+ query: infer Query;
309
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
310
+ };
311
+ } & {
312
+ changePassword: {
313
+ $post: <O_1 extends FetchOptions<unknown, {
314
+ newPassword: string;
315
+ currentPassword: string;
316
+ revokeOtherSessions?: boolean | undefined;
317
+ }, any, any, {
318
+ success: true;
319
+ data: {
320
+ success: true;
321
+ token: string | null;
322
+ user: {
323
+ [x: string]: hono_utils_types89.JSONValue;
324
+ id: string;
325
+ createdAt: string;
326
+ updatedAt: string;
327
+ email: string;
328
+ emailVerified: boolean;
329
+ name?: string | undefined | undefined;
330
+ image?: string | null | undefined | undefined;
331
+ };
332
+ redirect: false;
333
+ url: null;
334
+ } | {
335
+ success: true;
336
+ token: string | null;
337
+ user: {
338
+ [x: string]: hono_utils_types89.JSONValue;
339
+ id: string;
340
+ createdAt: string;
341
+ updatedAt: string;
342
+ email: string;
343
+ emailVerified: boolean;
344
+ name?: string | undefined | undefined;
345
+ image?: string | null | undefined | undefined;
346
+ };
347
+ redirect: true;
348
+ url: string;
349
+ } | {
350
+ success: false;
351
+ token: null;
352
+ user: null;
353
+ redirect: false;
354
+ url: null;
355
+ } | {
356
+ success: false;
357
+ token: null;
358
+ user: null;
359
+ redirect: true;
360
+ url: string;
361
+ };
362
+ }>>(args: {
363
+ json: {
364
+ newPassword: string;
365
+ currentPassword: string;
366
+ revokeOtherSessions?: boolean | undefined;
367
+ };
368
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
369
+ baseURL: string;
370
+ fetchOptions: {
371
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
372
+ };
373
+ })["fetchOptions"] extends {
374
+ throw: true;
375
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
376
+ baseURL: string;
377
+ fetchOptions: {
378
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
379
+ };
380
+ })["fetchOptions"] extends {
381
+ throw: true;
382
+ } ? true : false) ? T_2 extends true ? never : {
383
+ data: null;
384
+ error: {
385
+ success: false;
386
+ code?: string | undefined | undefined;
387
+ message?: string | undefined | undefined;
388
+ status: 401;
389
+ statusText: string;
390
+ };
391
+ } : never : never) | ((((C extends undefined ? {} : C) & {
392
+ baseURL: string;
393
+ fetchOptions: {
394
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
395
+ };
396
+ })["fetchOptions"] extends {
397
+ throw: true;
398
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
399
+ baseURL: string;
400
+ fetchOptions: {
401
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
402
+ };
403
+ })["fetchOptions"] extends {
404
+ throw: true;
405
+ } ? true : false) ? T_3 extends true ? never : {
406
+ data: null;
407
+ error: {
408
+ success: false;
409
+ code?: string | undefined;
410
+ message?: string | undefined;
411
+ status: 400;
412
+ statusText: string;
413
+ };
414
+ } : never : never) | ((((C extends undefined ? {} : C) & {
415
+ baseURL: string;
416
+ fetchOptions: {
417
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
418
+ };
419
+ })["fetchOptions"] extends {
420
+ throw: true;
421
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
422
+ baseURL: string;
423
+ fetchOptions: {
424
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
425
+ };
426
+ })["fetchOptions"] extends {
427
+ throw: true;
428
+ } ? true : false) ? T_4 extends true ? {
429
+ success: true;
430
+ data: {
431
+ success: true;
432
+ token: string | null;
433
+ user: {
434
+ [x: string]: hono_utils_types89.JSONValue;
435
+ id: string;
436
+ createdAt: string;
437
+ updatedAt: string;
438
+ email: string;
439
+ emailVerified: boolean;
440
+ name?: string | undefined | undefined;
441
+ image?: string | null | undefined | undefined;
442
+ };
443
+ redirect: false;
444
+ url: null;
445
+ } | {
446
+ success: true;
447
+ token: string | null;
448
+ user: {
449
+ [x: string]: hono_utils_types89.JSONValue;
450
+ id: string;
451
+ createdAt: string;
452
+ updatedAt: string;
453
+ email: string;
454
+ emailVerified: boolean;
455
+ name?: string | undefined | undefined;
456
+ image?: string | null | undefined | undefined;
457
+ };
458
+ redirect: true;
459
+ url: string;
460
+ } | {
461
+ success: false;
462
+ token: null;
463
+ user: null;
464
+ redirect: false;
465
+ url: null;
466
+ } | {
467
+ success: false;
468
+ token: null;
469
+ user: null;
470
+ redirect: true;
471
+ url: string;
472
+ };
473
+ } : {
474
+ data: {
475
+ success: true;
476
+ data: {
477
+ success: true;
478
+ token: string | null;
479
+ user: {
480
+ [x: string]: hono_utils_types89.JSONValue;
481
+ id: string;
482
+ createdAt: string;
483
+ updatedAt: string;
484
+ email: string;
485
+ emailVerified: boolean;
486
+ name?: string | undefined | undefined;
487
+ image?: string | null | undefined | undefined;
488
+ };
489
+ redirect: false;
490
+ url: null;
491
+ } | {
492
+ success: true;
493
+ token: string | null;
494
+ user: {
495
+ [x: string]: hono_utils_types89.JSONValue;
496
+ id: string;
497
+ createdAt: string;
498
+ updatedAt: string;
499
+ email: string;
500
+ emailVerified: boolean;
501
+ name?: string | undefined | undefined;
502
+ image?: string | null | undefined | undefined;
503
+ };
504
+ redirect: true;
505
+ url: string;
506
+ } | {
507
+ success: false;
508
+ token: null;
509
+ user: null;
510
+ redirect: false;
511
+ url: null;
512
+ } | {
513
+ success: false;
514
+ token: null;
515
+ user: null;
516
+ redirect: true;
517
+ url: string;
518
+ };
519
+ };
520
+ error: null;
521
+ } : never : never) | ((((C extends undefined ? {} : C) & {
522
+ baseURL: string;
523
+ fetchOptions: {
524
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
525
+ };
526
+ })["fetchOptions"] extends {
527
+ throw: true;
528
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
529
+ baseURL: string;
530
+ fetchOptions: {
531
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
532
+ };
533
+ })["fetchOptions"] extends {
534
+ throw: true;
535
+ } ? true : false) ? T_5 extends true ? never : {
536
+ data: null;
537
+ error: {
538
+ success: false;
539
+ code?: string | undefined;
540
+ message?: string | undefined;
541
+ status: 404;
542
+ statusText: string;
543
+ };
544
+ } : never : never) | ((((C extends undefined ? {} : C) & {
545
+ baseURL: string;
546
+ fetchOptions: {
547
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
548
+ };
549
+ })["fetchOptions"] extends {
550
+ throw: true;
551
+ } ? true : false) extends infer T_6 ? T_6 extends (((C extends undefined ? {} : C) & {
552
+ baseURL: string;
553
+ fetchOptions: {
554
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
555
+ };
556
+ })["fetchOptions"] extends {
557
+ throw: true;
558
+ } ? true : false) ? T_6 extends true ? never : {
559
+ data: null;
560
+ error: {
561
+ success: false;
562
+ errors: string[];
563
+ properties?: {
564
+ newPassword?: {
565
+ errors: string[];
566
+ } | undefined;
567
+ currentPassword?: {
568
+ errors: string[];
569
+ } | undefined;
570
+ revokeOtherSessions?: {
571
+ errors: string[];
572
+ } | undefined;
573
+ } | undefined;
574
+ status: 422;
575
+ statusText: string;
576
+ };
577
+ } : never : never) | ((((C extends undefined ? {} : C) & {
578
+ baseURL: string;
579
+ fetchOptions: {
580
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
581
+ };
582
+ })["fetchOptions"] extends {
583
+ throw: true;
584
+ } ? true : false) extends infer T_7 ? T_7 extends (((C extends undefined ? {} : C) & {
585
+ baseURL: string;
586
+ fetchOptions: {
587
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
588
+ };
589
+ })["fetchOptions"] extends {
590
+ throw: true;
591
+ } ? true : false) ? T_7 extends true ? never : {
592
+ data: null;
593
+ error: {
594
+ success: false;
595
+ code?: string | undefined;
596
+ message?: string | undefined;
597
+ status: 500;
598
+ statusText: string;
599
+ };
600
+ } : never : never)>;
601
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
602
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
603
+ param: infer Param;
604
+ } ? "/api/auth/change-password" : "/api/auth/change-password"}${Arg extends {
605
+ query: infer Query;
606
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
607
+ };
608
+ } & {
609
+ deleteUser: {
610
+ $post: <O_1 extends FetchOptions<unknown, {
611
+ callbackURL?: string | undefined;
612
+ password?: string | undefined;
613
+ token?: string | undefined;
614
+ }, any, any, {
615
+ success: true;
616
+ message?: string | undefined;
617
+ }>>(args: {
618
+ json: {
619
+ callbackURL?: string | undefined;
620
+ password?: string | undefined;
621
+ token?: string | undefined;
622
+ };
623
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
624
+ baseURL: string;
625
+ fetchOptions: {
626
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
627
+ };
628
+ })["fetchOptions"] extends {
629
+ throw: true;
630
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
631
+ baseURL: string;
632
+ fetchOptions: {
633
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
634
+ };
635
+ })["fetchOptions"] extends {
636
+ throw: true;
637
+ } ? true : false) ? T_2 extends true ? never : {
638
+ data: null;
639
+ error: {
640
+ success: false;
641
+ code?: string | undefined | undefined;
642
+ message?: string | undefined | undefined;
643
+ status: 401;
644
+ statusText: string;
645
+ };
646
+ } : never : never) | ((((C extends undefined ? {} : C) & {
647
+ baseURL: string;
648
+ fetchOptions: {
649
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
650
+ };
651
+ })["fetchOptions"] extends {
652
+ throw: true;
653
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
654
+ baseURL: string;
655
+ fetchOptions: {
656
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
657
+ };
658
+ })["fetchOptions"] extends {
659
+ throw: true;
660
+ } ? true : false) ? T_3 extends true ? never : {
661
+ data: null;
662
+ error: {
663
+ success: false;
664
+ code?: string | undefined;
665
+ message?: string | undefined;
666
+ status: 400;
667
+ statusText: string;
668
+ };
669
+ } : never : never) | ((((C extends undefined ? {} : C) & {
670
+ baseURL: string;
671
+ fetchOptions: {
672
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
673
+ };
674
+ })["fetchOptions"] extends {
675
+ throw: true;
676
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
677
+ baseURL: string;
678
+ fetchOptions: {
679
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
680
+ };
681
+ })["fetchOptions"] extends {
682
+ throw: true;
683
+ } ? true : false) ? T_4 extends true ? {
684
+ success: true;
685
+ message?: string | undefined;
686
+ } : {
687
+ data: {
688
+ success: true;
689
+ message?: string | undefined;
690
+ };
691
+ error: null;
692
+ } : never : never) | ((((C extends undefined ? {} : C) & {
693
+ baseURL: string;
694
+ fetchOptions: {
695
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
696
+ };
697
+ })["fetchOptions"] extends {
698
+ throw: true;
699
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
700
+ baseURL: string;
701
+ fetchOptions: {
702
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
703
+ };
704
+ })["fetchOptions"] extends {
705
+ throw: true;
706
+ } ? true : false) ? T_5 extends true ? never : {
707
+ data: null;
708
+ error: {
709
+ success: false;
710
+ code?: string | undefined;
711
+ message?: string | undefined;
712
+ status: 404;
713
+ statusText: string;
714
+ };
715
+ } : never : never) | ((((C extends undefined ? {} : C) & {
716
+ baseURL: string;
717
+ fetchOptions: {
718
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
719
+ };
720
+ })["fetchOptions"] extends {
721
+ throw: true;
722
+ } ? true : false) extends infer T_6 ? T_6 extends (((C extends undefined ? {} : C) & {
723
+ baseURL: string;
724
+ fetchOptions: {
725
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
726
+ };
727
+ })["fetchOptions"] extends {
728
+ throw: true;
729
+ } ? true : false) ? T_6 extends true ? never : {
730
+ data: null;
731
+ error: {
732
+ success: false;
733
+ errors: string[];
734
+ properties?: {
735
+ callbackURL?: {
736
+ errors: string[];
737
+ } | undefined;
738
+ password?: {
739
+ errors: string[];
740
+ } | undefined;
741
+ token?: {
742
+ errors: string[];
743
+ } | undefined;
744
+ } | undefined;
745
+ status: 422;
746
+ statusText: string;
747
+ };
748
+ } : never : never)>;
749
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
750
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
751
+ param: infer Param;
752
+ } ? "/api/auth/delete-user" : "/api/auth/delete-user"}${Arg extends {
753
+ query: infer Query;
754
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
755
+ };
756
+ } & {
757
+ deleteUser: {
758
+ callback: {
759
+ $get: <O_1 extends FetchOptions<unknown, any, {
760
+ token: string;
761
+ callbackURL?: string | undefined;
762
+ }, any, {
763
+ success: true;
764
+ message?: string | undefined;
765
+ }>>(args: {
766
+ query: {
767
+ token: string;
768
+ callbackURL?: string | undefined;
769
+ };
770
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
771
+ baseURL: string;
772
+ fetchOptions: {
773
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
774
+ };
775
+ })["fetchOptions"] extends {
776
+ throw: true;
777
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
778
+ baseURL: string;
779
+ fetchOptions: {
780
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
781
+ };
782
+ })["fetchOptions"] extends {
783
+ throw: true;
784
+ } ? true : false) ? T_2 extends true ? never : {
785
+ data: null;
786
+ error: {
787
+ success: false;
788
+ code?: string | undefined | undefined;
789
+ message?: string | undefined | undefined;
790
+ status: 401;
791
+ statusText: string;
792
+ };
793
+ } : never : never) | ((((C extends undefined ? {} : C) & {
794
+ baseURL: string;
795
+ fetchOptions: {
796
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
797
+ };
798
+ })["fetchOptions"] extends {
799
+ throw: true;
800
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
801
+ baseURL: string;
802
+ fetchOptions: {
803
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
804
+ };
805
+ })["fetchOptions"] extends {
806
+ throw: true;
807
+ } ? true : false) ? T_3 extends true ? {
808
+ success: true;
809
+ message?: string | undefined;
810
+ } : {
811
+ data: {
812
+ success: true;
813
+ message?: string | undefined;
814
+ };
815
+ error: null;
816
+ } : never : never) | ((((C extends undefined ? {} : C) & {
817
+ baseURL: string;
818
+ fetchOptions: {
819
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
820
+ };
821
+ })["fetchOptions"] extends {
822
+ throw: true;
823
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
824
+ baseURL: string;
825
+ fetchOptions: {
826
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
827
+ };
828
+ })["fetchOptions"] extends {
829
+ throw: true;
830
+ } ? true : false) ? T_4 extends true ? never : {
831
+ data: null;
832
+ error: {
833
+ success: false;
834
+ code?: string | undefined;
835
+ message?: string | undefined;
836
+ status: 404;
837
+ statusText: string;
838
+ };
839
+ } : never : never) | ((((C extends undefined ? {} : C) & {
840
+ baseURL: string;
841
+ fetchOptions: {
842
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
843
+ };
844
+ })["fetchOptions"] extends {
845
+ throw: true;
846
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
847
+ baseURL: string;
848
+ fetchOptions: {
849
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
850
+ };
851
+ })["fetchOptions"] extends {
852
+ throw: true;
853
+ } ? true : false) ? T_5 extends true ? never : {
854
+ data: null;
855
+ error: {
856
+ success: false;
857
+ errors: string[];
858
+ properties?: {
859
+ token?: {
860
+ errors: string[];
861
+ } | undefined;
862
+ callbackURL?: {
863
+ errors: string[];
864
+ } | undefined;
865
+ } | undefined;
866
+ status: 422;
867
+ statusText: string;
868
+ };
869
+ } : never : never)>;
870
+ $url: <const Arg extends {
871
+ query: {
872
+ token: string;
873
+ callbackURL?: string | undefined;
874
+ };
875
+ } | undefined = undefined>(arg?: Arg | undefined) => URL;
876
+ $path: <const Arg extends {
877
+ query: {
878
+ token: string;
879
+ callbackURL?: string | undefined;
880
+ };
881
+ } | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
882
+ param: infer Param;
883
+ } ? "/api/auth/delete-user/callback" : "/api/auth/delete-user/callback"}${Arg extends {
884
+ query: infer Query;
885
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
886
+ };
887
+ };
888
+ } & {
889
+ error: {
890
+ $get: <O_1 extends FetchOptions<unknown, any, {
891
+ error?: string | undefined;
892
+ error_description?: string | undefined;
893
+ }, any, string>>(args: {
894
+ query: {
895
+ error?: string | undefined;
896
+ error_description?: string | undefined;
897
+ };
898
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
899
+ baseURL: string;
900
+ fetchOptions: {
901
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
902
+ };
903
+ })["fetchOptions"] extends {
904
+ throw: true;
905
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
906
+ baseURL: string;
907
+ fetchOptions: {
908
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
909
+ };
910
+ })["fetchOptions"] extends {
911
+ throw: true;
912
+ } ? true : false) ? T_2 extends true ? string : {
913
+ data: string;
914
+ error: null;
915
+ } : never : never) | ((((C extends undefined ? {} : C) & {
916
+ baseURL: string;
917
+ fetchOptions: {
918
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
919
+ };
920
+ })["fetchOptions"] extends {
921
+ throw: true;
922
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
923
+ baseURL: string;
924
+ fetchOptions: {
925
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
926
+ };
927
+ })["fetchOptions"] extends {
928
+ throw: true;
929
+ } ? true : false) ? T_3 extends true ? never : {
930
+ data: null;
931
+ error: {
932
+ success: false;
933
+ errors: string[];
934
+ properties?: {
935
+ error?: {
936
+ errors: string[];
937
+ } | undefined;
938
+ error_description?: {
939
+ errors: string[];
940
+ } | undefined;
941
+ } | undefined;
942
+ status: 422;
943
+ statusText: string;
944
+ };
945
+ } : never : never)>;
946
+ $url: <const Arg extends {
947
+ query: {
948
+ error?: string | undefined;
949
+ error_description?: string | undefined;
950
+ };
951
+ } | undefined = undefined>(arg?: Arg | undefined) => URL;
952
+ $path: <const Arg extends {
953
+ query: {
954
+ error?: string | undefined;
955
+ error_description?: string | undefined;
956
+ };
957
+ } | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
958
+ param: infer Param;
959
+ } ? "/api/auth/error" : "/api/auth/error"}${Arg extends {
960
+ query: infer Query;
961
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
962
+ };
963
+ } & {
964
+ getAccessToken: {
965
+ $post: <O_1 extends FetchOptions<unknown, {
966
+ providerId: string;
967
+ accountId?: string | undefined;
968
+ userId?: string | undefined;
969
+ }, any, any, {
970
+ success: true;
971
+ data: {
972
+ tokenType?: string | undefined | undefined;
973
+ accessToken?: string | undefined | undefined;
974
+ refreshToken?: string | undefined | undefined;
975
+ accessTokenExpiresAt?: string | undefined;
976
+ refreshTokenExpiresAt?: string | undefined;
977
+ scopes?: string[] | undefined | undefined;
978
+ idToken?: string | undefined | undefined;
979
+ };
980
+ }>>(args: {
981
+ json: {
982
+ providerId: string;
983
+ accountId?: string | undefined;
984
+ userId?: string | undefined;
985
+ };
986
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
987
+ baseURL: string;
988
+ fetchOptions: {
989
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
990
+ };
991
+ })["fetchOptions"] extends {
992
+ throw: true;
993
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
994
+ baseURL: string;
995
+ fetchOptions: {
996
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
997
+ };
998
+ })["fetchOptions"] extends {
999
+ throw: true;
1000
+ } ? true : false) ? T_2 extends true ? never : {
1001
+ data: null;
1002
+ error: {
1003
+ success: false;
1004
+ code?: string | undefined | undefined;
1005
+ message?: string | undefined | undefined;
1006
+ status: 401;
1007
+ statusText: string;
1008
+ };
1009
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1010
+ baseURL: string;
1011
+ fetchOptions: {
1012
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1013
+ };
1014
+ })["fetchOptions"] extends {
1015
+ throw: true;
1016
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
1017
+ baseURL: string;
1018
+ fetchOptions: {
1019
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1020
+ };
1021
+ })["fetchOptions"] extends {
1022
+ throw: true;
1023
+ } ? true : false) ? T_3 extends true ? never : {
1024
+ data: null;
1025
+ error: {
1026
+ success: false;
1027
+ code?: string | undefined;
1028
+ message?: string | undefined;
1029
+ status: 400;
1030
+ statusText: string;
1031
+ };
1032
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1033
+ baseURL: string;
1034
+ fetchOptions: {
1035
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1036
+ };
1037
+ })["fetchOptions"] extends {
1038
+ throw: true;
1039
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
1040
+ baseURL: string;
1041
+ fetchOptions: {
1042
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1043
+ };
1044
+ })["fetchOptions"] extends {
1045
+ throw: true;
1046
+ } ? true : false) ? T_4 extends true ? {
1047
+ success: true;
1048
+ data: {
1049
+ tokenType?: string | undefined | undefined;
1050
+ accessToken?: string | undefined | undefined;
1051
+ refreshToken?: string | undefined | undefined;
1052
+ accessTokenExpiresAt?: string | undefined;
1053
+ refreshTokenExpiresAt?: string | undefined;
1054
+ scopes?: string[] | undefined | undefined;
1055
+ idToken?: string | undefined | undefined;
1056
+ };
1057
+ } : {
1058
+ data: {
1059
+ success: true;
1060
+ data: {
1061
+ tokenType?: string | undefined | undefined;
1062
+ accessToken?: string | undefined | undefined;
1063
+ refreshToken?: string | undefined | undefined;
1064
+ accessTokenExpiresAt?: string | undefined;
1065
+ refreshTokenExpiresAt?: string | undefined;
1066
+ scopes?: string[] | undefined | undefined;
1067
+ idToken?: string | undefined | undefined;
1068
+ };
1069
+ };
1070
+ error: null;
1071
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1072
+ baseURL: string;
1073
+ fetchOptions: {
1074
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1075
+ };
1076
+ })["fetchOptions"] extends {
1077
+ throw: true;
1078
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
1079
+ baseURL: string;
1080
+ fetchOptions: {
1081
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1082
+ };
1083
+ })["fetchOptions"] extends {
1084
+ throw: true;
1085
+ } ? true : false) ? T_5 extends true ? never : {
1086
+ data: null;
1087
+ error: {
1088
+ success: false;
1089
+ errors: string[];
1090
+ properties?: {
1091
+ providerId?: {
1092
+ errors: string[];
1093
+ } | undefined;
1094
+ accountId?: {
1095
+ errors: string[];
1096
+ } | undefined;
1097
+ userId?: {
1098
+ errors: string[];
1099
+ } | undefined;
1100
+ } | undefined;
1101
+ status: 422;
1102
+ statusText: string;
1103
+ };
1104
+ } : never : never)>;
1105
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
1106
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
1107
+ param: infer Param;
1108
+ } ? "/api/auth/get-access-token" : "/api/auth/get-access-token"}${Arg extends {
1109
+ query: infer Query;
1110
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
1111
+ };
1112
+ } & {
1113
+ accountInfo: {
1114
+ $post: <O_1 extends FetchOptions<unknown, {
1115
+ accountId: string;
1116
+ }, any, any, {
1117
+ success: true;
1118
+ data: {
1119
+ user: {
1120
+ [x: string]: hono_utils_types89.JSONValue;
1121
+ emailVerified: boolean;
1122
+ id: string;
1123
+ name?: string | undefined | undefined;
1124
+ image?: string | null | undefined | undefined;
1125
+ email?: string | null | undefined | undefined;
1126
+ };
1127
+ data: {
1128
+ [x: string]: any;
1129
+ };
1130
+ };
1131
+ }>>(args: {
1132
+ json: {
1133
+ accountId: string;
1134
+ };
1135
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
1136
+ baseURL: string;
1137
+ fetchOptions: {
1138
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1139
+ };
1140
+ })["fetchOptions"] extends {
1141
+ throw: true;
1142
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
1143
+ baseURL: string;
1144
+ fetchOptions: {
1145
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1146
+ };
1147
+ })["fetchOptions"] extends {
1148
+ throw: true;
1149
+ } ? true : false) ? T_2 extends true ? never : {
1150
+ data: null;
1151
+ error: {
1152
+ success: false;
1153
+ code?: string | undefined | undefined;
1154
+ message?: string | undefined | undefined;
1155
+ status: 401;
1156
+ statusText: string;
1157
+ };
1158
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1159
+ baseURL: string;
1160
+ fetchOptions: {
1161
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1162
+ };
1163
+ })["fetchOptions"] extends {
1164
+ throw: true;
1165
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
1166
+ baseURL: string;
1167
+ fetchOptions: {
1168
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1169
+ };
1170
+ })["fetchOptions"] extends {
1171
+ throw: true;
1172
+ } ? true : false) ? T_3 extends true ? never : {
1173
+ data: null;
1174
+ error: {
1175
+ success: false;
1176
+ code?: string | undefined;
1177
+ message?: string | undefined;
1178
+ status: 400;
1179
+ statusText: string;
1180
+ };
1181
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1182
+ baseURL: string;
1183
+ fetchOptions: {
1184
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1185
+ };
1186
+ })["fetchOptions"] extends {
1187
+ throw: true;
1188
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
1189
+ baseURL: string;
1190
+ fetchOptions: {
1191
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1192
+ };
1193
+ })["fetchOptions"] extends {
1194
+ throw: true;
1195
+ } ? true : false) ? T_4 extends true ? never : {
1196
+ data: null;
1197
+ error: {
1198
+ success: false;
1199
+ code?: string | undefined;
1200
+ message?: string | undefined;
1201
+ status: 500;
1202
+ statusText: string;
1203
+ };
1204
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1205
+ baseURL: string;
1206
+ fetchOptions: {
1207
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1208
+ };
1209
+ })["fetchOptions"] extends {
1210
+ throw: true;
1211
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
1212
+ baseURL: string;
1213
+ fetchOptions: {
1214
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1215
+ };
1216
+ })["fetchOptions"] extends {
1217
+ throw: true;
1218
+ } ? true : false) ? T_5 extends true ? {
1219
+ success: true;
1220
+ data: {
1221
+ user: {
1222
+ [x: string]: hono_utils_types89.JSONValue;
1223
+ emailVerified: boolean;
1224
+ id: string;
1225
+ name?: string | undefined | undefined;
1226
+ image?: string | null | undefined | undefined;
1227
+ email?: string | null | undefined | undefined;
1228
+ };
1229
+ data: {
1230
+ [x: string]: any;
1231
+ };
1232
+ };
1233
+ } : {
1234
+ data: {
1235
+ success: true;
1236
+ data: {
1237
+ user: {
1238
+ [x: string]: hono_utils_types89.JSONValue;
1239
+ emailVerified: boolean;
1240
+ id: string;
1241
+ name?: string | undefined | undefined;
1242
+ image?: string | null | undefined | undefined;
1243
+ email?: string | null | undefined | undefined;
1244
+ };
1245
+ data: {
1246
+ [x: string]: any;
1247
+ };
1248
+ };
1249
+ };
1250
+ error: null;
1251
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1252
+ baseURL: string;
1253
+ fetchOptions: {
1254
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1255
+ };
1256
+ })["fetchOptions"] extends {
1257
+ throw: true;
1258
+ } ? true : false) extends infer T_6 ? T_6 extends (((C extends undefined ? {} : C) & {
1259
+ baseURL: string;
1260
+ fetchOptions: {
1261
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1262
+ };
1263
+ })["fetchOptions"] extends {
1264
+ throw: true;
1265
+ } ? true : false) ? T_6 extends true ? never : {
1266
+ data: null;
1267
+ error: {
1268
+ success: false;
1269
+ errors: string[];
1270
+ properties?: {
1271
+ accountId?: {
1272
+ errors: string[];
1273
+ } | undefined;
1274
+ } | undefined;
1275
+ status: 422;
1276
+ statusText: string;
1277
+ };
1278
+ } : never : never)>;
1279
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
1280
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
1281
+ param: infer Param;
1282
+ } ? "/api/auth/account-info" : "/api/auth/account-info"}${Arg extends {
1283
+ query: infer Query;
1284
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
1285
+ };
1286
+ } & {
1287
+ getSession: {
1288
+ $get: <O_1 extends FetchOptions<unknown, any, {
1289
+ disableCookieCache?: string | boolean | undefined;
1290
+ disableRefresh?: string | boolean | undefined;
1291
+ }, any, {
1292
+ success: true;
1293
+ data: {
1294
+ session: {
1295
+ [x: string]: hono_utils_types89.JSONValue;
1296
+ createdAt: string;
1297
+ updatedAt: string;
1298
+ userId: string;
1299
+ expiresAt: string;
1300
+ token: string;
1301
+ id?: string | undefined | undefined;
1302
+ ipAddress?: string | null | undefined | undefined;
1303
+ userAgent?: string | null | undefined | undefined;
1304
+ };
1305
+ user: {
1306
+ [x: string]: hono_utils_types89.JSONValue;
1307
+ id: string;
1308
+ createdAt: string;
1309
+ updatedAt: string;
1310
+ email: string;
1311
+ emailVerified: boolean;
1312
+ name?: string | undefined | undefined;
1313
+ image?: string | null | undefined | undefined;
1314
+ };
1315
+ };
1316
+ }>>(args: {
1317
+ query: {
1318
+ disableCookieCache?: string | boolean | undefined;
1319
+ disableRefresh?: string | boolean | undefined;
1320
+ };
1321
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
1322
+ baseURL: string;
1323
+ fetchOptions: {
1324
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1325
+ };
1326
+ })["fetchOptions"] extends {
1327
+ throw: true;
1328
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
1329
+ baseURL: string;
1330
+ fetchOptions: {
1331
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1332
+ };
1333
+ })["fetchOptions"] extends {
1334
+ throw: true;
1335
+ } ? true : false) ? T_2 extends true ? never : {
1336
+ data: null;
1337
+ error: {
1338
+ success: false;
1339
+ code?: string | undefined;
1340
+ message?: string | undefined;
1341
+ status: 500;
1342
+ statusText: string;
1343
+ };
1344
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1345
+ baseURL: string;
1346
+ fetchOptions: {
1347
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1348
+ };
1349
+ })["fetchOptions"] extends {
1350
+ throw: true;
1351
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
1352
+ baseURL: string;
1353
+ fetchOptions: {
1354
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1355
+ };
1356
+ })["fetchOptions"] extends {
1357
+ throw: true;
1358
+ } ? true : false) ? T_3 extends true ? {
1359
+ success: true;
1360
+ data: {
1361
+ session: {
1362
+ [x: string]: hono_utils_types89.JSONValue;
1363
+ createdAt: string;
1364
+ updatedAt: string;
1365
+ userId: string;
1366
+ expiresAt: string;
1367
+ token: string;
1368
+ id?: string | undefined | undefined;
1369
+ ipAddress?: string | null | undefined | undefined;
1370
+ userAgent?: string | null | undefined | undefined;
1371
+ };
1372
+ user: {
1373
+ [x: string]: hono_utils_types89.JSONValue;
1374
+ id: string;
1375
+ createdAt: string;
1376
+ updatedAt: string;
1377
+ email: string;
1378
+ emailVerified: boolean;
1379
+ name?: string | undefined | undefined;
1380
+ image?: string | null | undefined | undefined;
1381
+ };
1382
+ };
1383
+ } : {
1384
+ data: {
1385
+ success: true;
1386
+ data: {
1387
+ session: {
1388
+ [x: string]: hono_utils_types89.JSONValue;
1389
+ createdAt: string;
1390
+ updatedAt: string;
1391
+ userId: string;
1392
+ expiresAt: string;
1393
+ token: string;
1394
+ id?: string | undefined | undefined;
1395
+ ipAddress?: string | null | undefined | undefined;
1396
+ userAgent?: string | null | undefined | undefined;
1397
+ };
1398
+ user: {
1399
+ [x: string]: hono_utils_types89.JSONValue;
1400
+ id: string;
1401
+ createdAt: string;
1402
+ updatedAt: string;
1403
+ email: string;
1404
+ emailVerified: boolean;
1405
+ name?: string | undefined | undefined;
1406
+ image?: string | null | undefined | undefined;
1407
+ };
1408
+ };
1409
+ };
1410
+ error: null;
1411
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1412
+ baseURL: string;
1413
+ fetchOptions: {
1414
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1415
+ };
1416
+ })["fetchOptions"] extends {
1417
+ throw: true;
1418
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
1419
+ baseURL: string;
1420
+ fetchOptions: {
1421
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1422
+ };
1423
+ })["fetchOptions"] extends {
1424
+ throw: true;
1425
+ } ? true : false) ? T_4 extends true ? never : {
1426
+ data: null;
1427
+ error: {
1428
+ success: false;
1429
+ code?: string | undefined;
1430
+ message?: string | undefined;
1431
+ status: 401;
1432
+ statusText: string;
1433
+ };
1434
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1435
+ baseURL: string;
1436
+ fetchOptions: {
1437
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1438
+ };
1439
+ })["fetchOptions"] extends {
1440
+ throw: true;
1441
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
1442
+ baseURL: string;
1443
+ fetchOptions: {
1444
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1445
+ };
1446
+ })["fetchOptions"] extends {
1447
+ throw: true;
1448
+ } ? true : false) ? T_5 extends true ? never : {
1449
+ data: null;
1450
+ error: {
1451
+ success: false;
1452
+ errors: string[];
1453
+ properties?: {
1454
+ disableCookieCache?: {
1455
+ errors: string[];
1456
+ } | undefined;
1457
+ disableRefresh?: {
1458
+ errors: string[];
1459
+ } | undefined;
1460
+ } | undefined;
1461
+ status: 422;
1462
+ statusText: string;
1463
+ };
1464
+ } : never : never)>;
1465
+ $url: <const Arg extends {
1466
+ query: {
1467
+ disableCookieCache?: string | boolean | undefined;
1468
+ disableRefresh?: string | boolean | undefined;
1469
+ };
1470
+ } | undefined = undefined>(arg?: Arg | undefined) => URL;
1471
+ $path: <const Arg extends {
1472
+ query: {
1473
+ disableCookieCache?: string | boolean | undefined;
1474
+ disableRefresh?: string | boolean | undefined;
1475
+ };
1476
+ } | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
1477
+ param: infer Param;
1478
+ } ? "/api/auth/get-session" : "/api/auth/get-session"}${Arg extends {
1479
+ query: infer Query;
1480
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
1481
+ };
1482
+ } & {
1483
+ linkSocial: {
1484
+ $post: <O_1 extends FetchOptions<unknown, {
1485
+ provider: _faire_auth_core_social_providers25.SocialProvider;
1486
+ callbackURL?: string | undefined;
1487
+ idToken?: {
1488
+ token: string;
1489
+ nonce?: string | undefined;
1490
+ accessToken?: string | undefined;
1491
+ refreshToken?: string | undefined;
1492
+ scopes?: string[] | undefined;
1493
+ } | undefined;
1494
+ scopes?: string[] | undefined;
1495
+ errorCallbackURL?: string | undefined;
1496
+ }, any, any, {
1497
+ success: true;
1498
+ data: {
1499
+ redirect: false;
1500
+ url: null;
1501
+ } | {
1502
+ redirect: true;
1503
+ url: string;
1504
+ };
1505
+ }>>(args: {
1506
+ json: {
1507
+ provider: _faire_auth_core_social_providers25.SocialProvider;
1508
+ callbackURL?: string | undefined;
1509
+ idToken?: {
1510
+ token: string;
1511
+ nonce?: string | undefined;
1512
+ accessToken?: string | undefined;
1513
+ refreshToken?: string | undefined;
1514
+ scopes?: string[] | undefined;
1515
+ } | undefined;
1516
+ scopes?: string[] | undefined;
1517
+ errorCallbackURL?: string | undefined;
1518
+ };
1519
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
1520
+ baseURL: string;
1521
+ fetchOptions: {
1522
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1523
+ };
1524
+ })["fetchOptions"] extends {
1525
+ throw: true;
1526
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
1527
+ baseURL: string;
1528
+ fetchOptions: {
1529
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1530
+ };
1531
+ })["fetchOptions"] extends {
1532
+ throw: true;
1533
+ } ? true : false) ? T_2 extends true ? never : {
1534
+ data: null;
1535
+ error: {
1536
+ success: false;
1537
+ code?: string | undefined | undefined;
1538
+ message?: string | undefined | undefined;
1539
+ status: 401;
1540
+ statusText: string;
1541
+ };
1542
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1543
+ baseURL: string;
1544
+ fetchOptions: {
1545
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1546
+ };
1547
+ })["fetchOptions"] extends {
1548
+ throw: true;
1549
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
1550
+ baseURL: string;
1551
+ fetchOptions: {
1552
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1553
+ };
1554
+ })["fetchOptions"] extends {
1555
+ throw: true;
1556
+ } ? true : false) ? T_3 extends true ? never : {
1557
+ data: null;
1558
+ error: {
1559
+ success: false;
1560
+ code?: string | undefined;
1561
+ message?: string | undefined;
1562
+ status: 404;
1563
+ statusText: string;
1564
+ };
1565
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1566
+ baseURL: string;
1567
+ fetchOptions: {
1568
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1569
+ };
1570
+ })["fetchOptions"] extends {
1571
+ throw: true;
1572
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
1573
+ baseURL: string;
1574
+ fetchOptions: {
1575
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1576
+ };
1577
+ })["fetchOptions"] extends {
1578
+ throw: true;
1579
+ } ? true : false) ? T_4 extends true ? never : {
1580
+ data: null;
1581
+ error: {
1582
+ success: false;
1583
+ code?: string | undefined;
1584
+ message?: string | undefined;
1585
+ status: 401;
1586
+ statusText: string;
1587
+ };
1588
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1589
+ baseURL: string;
1590
+ fetchOptions: {
1591
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1592
+ };
1593
+ })["fetchOptions"] extends {
1594
+ throw: true;
1595
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
1596
+ baseURL: string;
1597
+ fetchOptions: {
1598
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1599
+ };
1600
+ })["fetchOptions"] extends {
1601
+ throw: true;
1602
+ } ? true : false) ? T_5 extends true ? {
1603
+ success: true;
1604
+ data: {
1605
+ redirect: false;
1606
+ url: null;
1607
+ } | {
1608
+ redirect: true;
1609
+ url: string;
1610
+ };
1611
+ } : {
1612
+ data: {
1613
+ success: true;
1614
+ data: {
1615
+ redirect: false;
1616
+ url: null;
1617
+ } | {
1618
+ redirect: true;
1619
+ url: string;
1620
+ };
1621
+ };
1622
+ error: null;
1623
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1624
+ baseURL: string;
1625
+ fetchOptions: {
1626
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1627
+ };
1628
+ })["fetchOptions"] extends {
1629
+ throw: true;
1630
+ } ? true : false) extends infer T_6 ? T_6 extends (((C extends undefined ? {} : C) & {
1631
+ baseURL: string;
1632
+ fetchOptions: {
1633
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1634
+ };
1635
+ })["fetchOptions"] extends {
1636
+ throw: true;
1637
+ } ? true : false) ? T_6 extends true ? never : {
1638
+ data: null;
1639
+ error: {
1640
+ success: false;
1641
+ code?: string | undefined;
1642
+ message?: string | undefined;
1643
+ status: 417;
1644
+ statusText: string;
1645
+ };
1646
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1647
+ baseURL: string;
1648
+ fetchOptions: {
1649
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1650
+ };
1651
+ })["fetchOptions"] extends {
1652
+ throw: true;
1653
+ } ? true : false) extends infer T_7 ? T_7 extends (((C extends undefined ? {} : C) & {
1654
+ baseURL: string;
1655
+ fetchOptions: {
1656
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1657
+ };
1658
+ })["fetchOptions"] extends {
1659
+ throw: true;
1660
+ } ? true : false) ? T_7 extends true ? never : {
1661
+ data: null;
1662
+ error: {
1663
+ success: false;
1664
+ errors: string[];
1665
+ properties?: {
1666
+ provider?: {
1667
+ errors: string[];
1668
+ } | undefined;
1669
+ callbackURL?: {
1670
+ errors: string[];
1671
+ } | undefined;
1672
+ idToken?: {
1673
+ errors: string[];
1674
+ } | {
1675
+ errors: string[];
1676
+ properties?: {
1677
+ token?: {
1678
+ errors: string[];
1679
+ } | undefined;
1680
+ nonce?: {
1681
+ errors: string[];
1682
+ } | undefined;
1683
+ accessToken?: {
1684
+ errors: string[];
1685
+ } | undefined;
1686
+ refreshToken?: {
1687
+ errors: string[];
1688
+ } | undefined;
1689
+ scopes?: {
1690
+ errors: string[];
1691
+ } | {
1692
+ errors: string[];
1693
+ items?: {
1694
+ errors: string[];
1695
+ }[] | undefined;
1696
+ } | undefined;
1697
+ } | undefined;
1698
+ } | undefined;
1699
+ scopes?: {
1700
+ errors: string[];
1701
+ } | {
1702
+ errors: string[];
1703
+ items?: {
1704
+ errors: string[];
1705
+ }[] | undefined;
1706
+ } | undefined;
1707
+ errorCallbackURL?: {
1708
+ errors: string[];
1709
+ } | undefined;
1710
+ } | undefined;
1711
+ status: 422;
1712
+ statusText: string;
1713
+ };
1714
+ } : never : never)>;
1715
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
1716
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
1717
+ param: infer Param;
1718
+ } ? "/api/auth/link-social" : "/api/auth/link-social"}${Arg extends {
1719
+ query: infer Query;
1720
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
1721
+ };
1722
+ } & {
1723
+ listAccounts: {
1724
+ $get: <O_1 extends FetchOptions<unknown, any, any, any, {
1725
+ success: true;
1726
+ data: {
1727
+ [x: string]: hono_utils_types89.JSONValue;
1728
+ id: string;
1729
+ createdAt: string;
1730
+ updatedAt: string;
1731
+ providerId: string;
1732
+ accountId: string;
1733
+ scopes: string[];
1734
+ }[];
1735
+ }>>(options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
1736
+ baseURL: string;
1737
+ fetchOptions: {
1738
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1739
+ };
1740
+ })["fetchOptions"] extends {
1741
+ throw: true;
1742
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
1743
+ baseURL: string;
1744
+ fetchOptions: {
1745
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1746
+ };
1747
+ })["fetchOptions"] extends {
1748
+ throw: true;
1749
+ } ? true : false) ? T_2 extends true ? never : {
1750
+ data: null;
1751
+ error: {
1752
+ success: false;
1753
+ code?: string | undefined | undefined;
1754
+ message?: string | undefined | undefined;
1755
+ status: 401;
1756
+ statusText: string;
1757
+ };
1758
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1759
+ baseURL: string;
1760
+ fetchOptions: {
1761
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1762
+ };
1763
+ })["fetchOptions"] extends {
1764
+ throw: true;
1765
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
1766
+ baseURL: string;
1767
+ fetchOptions: {
1768
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1769
+ };
1770
+ })["fetchOptions"] extends {
1771
+ throw: true;
1772
+ } ? true : false) ? T_3 extends true ? {
1773
+ success: true;
1774
+ data: {
1775
+ [x: string]: hono_utils_types89.JSONValue;
1776
+ id: string;
1777
+ createdAt: string;
1778
+ updatedAt: string;
1779
+ providerId: string;
1780
+ accountId: string;
1781
+ scopes: string[];
1782
+ }[];
1783
+ } : {
1784
+ data: {
1785
+ success: true;
1786
+ data: {
1787
+ [x: string]: hono_utils_types89.JSONValue;
1788
+ id: string;
1789
+ createdAt: string;
1790
+ updatedAt: string;
1791
+ providerId: string;
1792
+ accountId: string;
1793
+ scopes: string[];
1794
+ }[];
1795
+ };
1796
+ error: null;
1797
+ } : never : never)>;
1798
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
1799
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
1800
+ param: infer Param;
1801
+ } ? "/api/auth/list-accounts" : "/api/auth/list-accounts"}${Arg extends {
1802
+ query: infer Query;
1803
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
1804
+ };
1805
+ } & {
1806
+ listSessions: {
1807
+ $get: <O_1 extends FetchOptions<unknown, any, any, any, {
1808
+ success: true;
1809
+ data: {
1810
+ [x: string]: hono_utils_types89.JSONValue;
1811
+ createdAt: string;
1812
+ updatedAt: string;
1813
+ userId: string;
1814
+ expiresAt: string;
1815
+ token: string;
1816
+ id?: string | undefined | undefined;
1817
+ ipAddress?: string | null | undefined | undefined;
1818
+ userAgent?: string | null | undefined | undefined;
1819
+ }[];
1820
+ }>>(options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
1821
+ baseURL: string;
1822
+ fetchOptions: {
1823
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1824
+ };
1825
+ })["fetchOptions"] extends {
1826
+ throw: true;
1827
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
1828
+ baseURL: string;
1829
+ fetchOptions: {
1830
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1831
+ };
1832
+ })["fetchOptions"] extends {
1833
+ throw: true;
1834
+ } ? true : false) ? T_2 extends true ? never : {
1835
+ data: null;
1836
+ error: {
1837
+ success: false;
1838
+ code?: string | undefined | undefined;
1839
+ message?: string | undefined | undefined;
1840
+ status: 401;
1841
+ statusText: string;
1842
+ };
1843
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1844
+ baseURL: string;
1845
+ fetchOptions: {
1846
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1847
+ };
1848
+ })["fetchOptions"] extends {
1849
+ throw: true;
1850
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
1851
+ baseURL: string;
1852
+ fetchOptions: {
1853
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1854
+ };
1855
+ })["fetchOptions"] extends {
1856
+ throw: true;
1857
+ } ? true : false) ? T_3 extends true ? never : {
1858
+ data: null;
1859
+ error: {
1860
+ success: false;
1861
+ code?: string | undefined;
1862
+ message?: string | undefined;
1863
+ status: 500;
1864
+ statusText: string;
1865
+ };
1866
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1867
+ baseURL: string;
1868
+ fetchOptions: {
1869
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1870
+ };
1871
+ })["fetchOptions"] extends {
1872
+ throw: true;
1873
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
1874
+ baseURL: string;
1875
+ fetchOptions: {
1876
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1877
+ };
1878
+ })["fetchOptions"] extends {
1879
+ throw: true;
1880
+ } ? true : false) ? T_4 extends true ? {
1881
+ success: true;
1882
+ data: {
1883
+ [x: string]: hono_utils_types89.JSONValue;
1884
+ createdAt: string;
1885
+ updatedAt: string;
1886
+ userId: string;
1887
+ expiresAt: string;
1888
+ token: string;
1889
+ id?: string | undefined | undefined;
1890
+ ipAddress?: string | null | undefined | undefined;
1891
+ userAgent?: string | null | undefined | undefined;
1892
+ }[];
1893
+ } : {
1894
+ data: {
1895
+ success: true;
1896
+ data: {
1897
+ [x: string]: hono_utils_types89.JSONValue;
1898
+ createdAt: string;
1899
+ updatedAt: string;
1900
+ userId: string;
1901
+ expiresAt: string;
1902
+ token: string;
1903
+ id?: string | undefined | undefined;
1904
+ ipAddress?: string | null | undefined | undefined;
1905
+ userAgent?: string | null | undefined | undefined;
1906
+ }[];
1907
+ };
1908
+ error: null;
1909
+ } : never : never)>;
1910
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
1911
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
1912
+ param: infer Param;
1913
+ } ? "/api/auth/list-sessions" : "/api/auth/list-sessions"}${Arg extends {
1914
+ query: infer Query;
1915
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
1916
+ };
1917
+ } & {
1918
+ callback: {
1919
+ ":id": {
1920
+ $get: <O_1 extends FetchOptions<unknown, any, {
1921
+ code?: string | undefined;
1922
+ error?: string | undefined;
1923
+ device_id?: string | undefined;
1924
+ error_description?: string | undefined;
1925
+ state?: string | undefined;
1926
+ user?: string | undefined;
1927
+ }, {
1928
+ id: string;
1929
+ }, hono_utils_types89.JSONValue>>(args: {
1930
+ param: {
1931
+ id: string;
1932
+ };
1933
+ } & {
1934
+ query: {
1935
+ code?: string | undefined;
1936
+ error?: string | undefined;
1937
+ device_id?: string | undefined;
1938
+ error_description?: string | undefined;
1939
+ state?: string | undefined;
1940
+ user?: string | undefined;
1941
+ };
1942
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
1943
+ baseURL: string;
1944
+ fetchOptions: {
1945
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1946
+ };
1947
+ })["fetchOptions"] extends {
1948
+ throw: true;
1949
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
1950
+ baseURL: string;
1951
+ fetchOptions: {
1952
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1953
+ };
1954
+ })["fetchOptions"] extends {
1955
+ throw: true;
1956
+ } ? true : false) ? T_2 extends true ? never : {
1957
+ data: null;
1958
+ error: {
1959
+ success: false;
1960
+ code?: string | undefined;
1961
+ message?: string | undefined;
1962
+ status: 400;
1963
+ statusText: string;
1964
+ };
1965
+ } : never : never) | ((((C extends undefined ? {} : C) & {
1966
+ baseURL: string;
1967
+ fetchOptions: {
1968
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1969
+ };
1970
+ })["fetchOptions"] extends {
1971
+ throw: true;
1972
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
1973
+ baseURL: string;
1974
+ fetchOptions: {
1975
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
1976
+ };
1977
+ })["fetchOptions"] extends {
1978
+ throw: true;
1979
+ } ? true : false) ? T_3 extends true ? hono_utils_types89.JSONValue : {
1980
+ data: hono_utils_types89.JSONValue;
1981
+ error: null;
1982
+ } : never : never)>;
1983
+ $post: <O_1 extends FetchOptions<unknown, {
1984
+ code?: string | undefined;
1985
+ error?: string | undefined;
1986
+ device_id?: string | undefined;
1987
+ error_description?: string | undefined;
1988
+ state?: string | undefined;
1989
+ user?: string | undefined;
1990
+ } | undefined, any, {
1991
+ id: string;
1992
+ }, hono_utils_types89.JSONValue>>(args: {
1993
+ json: {
1994
+ code?: string | undefined;
1995
+ error?: string | undefined;
1996
+ device_id?: string | undefined;
1997
+ error_description?: string | undefined;
1998
+ state?: string | undefined;
1999
+ user?: string | undefined;
2000
+ } | undefined;
2001
+ } & {
2002
+ param: {
2003
+ id: string;
2004
+ };
2005
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
2006
+ baseURL: string;
2007
+ fetchOptions: {
2008
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2009
+ };
2010
+ })["fetchOptions"] extends {
2011
+ throw: true;
2012
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
2013
+ baseURL: string;
2014
+ fetchOptions: {
2015
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2016
+ };
2017
+ })["fetchOptions"] extends {
2018
+ throw: true;
2019
+ } ? true : false) ? T_2 extends true ? never : {
2020
+ data: null;
2021
+ error: {
2022
+ success: false;
2023
+ code?: string | undefined;
2024
+ message?: string | undefined;
2025
+ status: 400;
2026
+ statusText: string;
2027
+ };
2028
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2029
+ baseURL: string;
2030
+ fetchOptions: {
2031
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2032
+ };
2033
+ })["fetchOptions"] extends {
2034
+ throw: true;
2035
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
2036
+ baseURL: string;
2037
+ fetchOptions: {
2038
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2039
+ };
2040
+ })["fetchOptions"] extends {
2041
+ throw: true;
2042
+ } ? true : false) ? T_3 extends true ? hono_utils_types89.JSONValue : {
2043
+ data: hono_utils_types89.JSONValue;
2044
+ error: null;
2045
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2046
+ baseURL: string;
2047
+ fetchOptions: {
2048
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2049
+ };
2050
+ })["fetchOptions"] extends {
2051
+ throw: true;
2052
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
2053
+ baseURL: string;
2054
+ fetchOptions: {
2055
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2056
+ };
2057
+ })["fetchOptions"] extends {
2058
+ throw: true;
2059
+ } ? true : false) ? T_4 extends true ? never : {
2060
+ data: null;
2061
+ error: {
2062
+ success: false;
2063
+ errors: string[];
2064
+ properties?: {
2065
+ code?: {
2066
+ errors: string[];
2067
+ } | undefined;
2068
+ error?: {
2069
+ errors: string[];
2070
+ } | undefined;
2071
+ device_id?: {
2072
+ errors: string[];
2073
+ } | undefined;
2074
+ error_description?: {
2075
+ errors: string[];
2076
+ } | undefined;
2077
+ state?: {
2078
+ errors: string[];
2079
+ } | undefined;
2080
+ user?: {
2081
+ errors: string[];
2082
+ } | undefined;
2083
+ } | undefined;
2084
+ status: 422;
2085
+ statusText: string;
2086
+ };
2087
+ } : never : never)>;
2088
+ $url: <const Arg extends {
2089
+ param: {
2090
+ id: string;
2091
+ };
2092
+ query: {
2093
+ code?: string | undefined;
2094
+ error?: string | undefined;
2095
+ device_id?: string | undefined;
2096
+ error_description?: string | undefined;
2097
+ state?: string | undefined;
2098
+ user?: string | undefined;
2099
+ };
2100
+ } | {
2101
+ param: {
2102
+ id: string;
2103
+ };
2104
+ } | undefined = undefined>(arg?: Arg | undefined) => URL;
2105
+ $path: <const Arg extends {
2106
+ param: {
2107
+ id: string;
2108
+ };
2109
+ query: {
2110
+ code?: string | undefined;
2111
+ error?: string | undefined;
2112
+ device_id?: string | undefined;
2113
+ error_description?: string | undefined;
2114
+ state?: string | undefined;
2115
+ user?: string | undefined;
2116
+ };
2117
+ } | {
2118
+ param: {
2119
+ id: string;
2120
+ };
2121
+ } | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
2122
+ param: infer Param;
2123
+ } ? `${Param extends Record<"id", infer Value extends string> ? ([Value] extends [never] ? false : string extends Value ? false : true) extends true ? `/api/auth/callback/${Value}` : "/api/auth/callback/:id" : "/api/auth/callback/:id"}` : "/api/auth/callback/:id"}${Arg extends {
2124
+ query: infer Query;
2125
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
2126
+ };
2127
+ };
2128
+ } & {
2129
+ ok: {
2130
+ $get: <O_1 extends FetchOptions<unknown, any, any, any, {
2131
+ success: true;
2132
+ message?: string | undefined;
2133
+ }>>(options?: O_1 | undefined) => Promise<(((C extends undefined ? {} : C) & {
2134
+ baseURL: string;
2135
+ fetchOptions: {
2136
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2137
+ };
2138
+ })["fetchOptions"] extends {
2139
+ throw: true;
2140
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
2141
+ baseURL: string;
2142
+ fetchOptions: {
2143
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2144
+ };
2145
+ })["fetchOptions"] extends {
2146
+ throw: true;
2147
+ } ? true : false) ? T_2 extends true ? {
2148
+ success: true;
2149
+ message?: string | undefined;
2150
+ } : {
2151
+ data: {
2152
+ success: true;
2153
+ message?: string | undefined;
2154
+ };
2155
+ error: null;
2156
+ } : never : never>;
2157
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
2158
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
2159
+ param: infer Param;
2160
+ } ? "/api/auth/ok" : "/api/auth/ok"}${Arg extends {
2161
+ query: infer Query;
2162
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
2163
+ };
2164
+ } & {
2165
+ refreshToken: {
2166
+ $post: <O_1 extends FetchOptions<unknown, {
2167
+ providerId: string;
2168
+ accountId?: string | undefined;
2169
+ userId?: string | undefined;
2170
+ }, any, any, {
2171
+ success: true;
2172
+ data: {
2173
+ tokenType?: string | undefined | undefined;
2174
+ accessToken?: string | undefined | undefined;
2175
+ refreshToken?: string | undefined | undefined;
2176
+ accessTokenExpiresAt?: string | undefined;
2177
+ refreshTokenExpiresAt?: string | undefined;
2178
+ scopes?: string[] | undefined | undefined;
2179
+ idToken?: string | undefined | undefined;
2180
+ };
2181
+ }>>(args: {
2182
+ json: {
2183
+ providerId: string;
2184
+ accountId?: string | undefined;
2185
+ userId?: string | undefined;
2186
+ };
2187
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
2188
+ baseURL: string;
2189
+ fetchOptions: {
2190
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2191
+ };
2192
+ })["fetchOptions"] extends {
2193
+ throw: true;
2194
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
2195
+ baseURL: string;
2196
+ fetchOptions: {
2197
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2198
+ };
2199
+ })["fetchOptions"] extends {
2200
+ throw: true;
2201
+ } ? true : false) ? T_2 extends true ? never : {
2202
+ data: null;
2203
+ error: {
2204
+ success: false;
2205
+ code?: string | undefined | undefined;
2206
+ message?: string | undefined | undefined;
2207
+ status: 401;
2208
+ statusText: string;
2209
+ };
2210
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2211
+ baseURL: string;
2212
+ fetchOptions: {
2213
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2214
+ };
2215
+ })["fetchOptions"] extends {
2216
+ throw: true;
2217
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
2218
+ baseURL: string;
2219
+ fetchOptions: {
2220
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2221
+ };
2222
+ })["fetchOptions"] extends {
2223
+ throw: true;
2224
+ } ? true : false) ? T_3 extends true ? never : {
2225
+ data: null;
2226
+ error: {
2227
+ success: false;
2228
+ code?: string | undefined;
2229
+ message?: string | undefined;
2230
+ status: 400;
2231
+ statusText: string;
2232
+ };
2233
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2234
+ baseURL: string;
2235
+ fetchOptions: {
2236
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2237
+ };
2238
+ })["fetchOptions"] extends {
2239
+ throw: true;
2240
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
2241
+ baseURL: string;
2242
+ fetchOptions: {
2243
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2244
+ };
2245
+ })["fetchOptions"] extends {
2246
+ throw: true;
2247
+ } ? true : false) ? T_4 extends true ? {
2248
+ success: true;
2249
+ data: {
2250
+ tokenType?: string | undefined | undefined;
2251
+ accessToken?: string | undefined | undefined;
2252
+ refreshToken?: string | undefined | undefined;
2253
+ accessTokenExpiresAt?: string | undefined;
2254
+ refreshTokenExpiresAt?: string | undefined;
2255
+ scopes?: string[] | undefined | undefined;
2256
+ idToken?: string | undefined | undefined;
2257
+ };
2258
+ } : {
2259
+ data: {
2260
+ success: true;
2261
+ data: {
2262
+ tokenType?: string | undefined | undefined;
2263
+ accessToken?: string | undefined | undefined;
2264
+ refreshToken?: string | undefined | undefined;
2265
+ accessTokenExpiresAt?: string | undefined;
2266
+ refreshTokenExpiresAt?: string | undefined;
2267
+ scopes?: string[] | undefined | undefined;
2268
+ idToken?: string | undefined | undefined;
2269
+ };
2270
+ };
2271
+ error: null;
2272
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2273
+ baseURL: string;
2274
+ fetchOptions: {
2275
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2276
+ };
2277
+ })["fetchOptions"] extends {
2278
+ throw: true;
2279
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
2280
+ baseURL: string;
2281
+ fetchOptions: {
2282
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2283
+ };
2284
+ })["fetchOptions"] extends {
2285
+ throw: true;
2286
+ } ? true : false) ? T_5 extends true ? never : {
2287
+ data: null;
2288
+ error: {
2289
+ success: false;
2290
+ errors: string[];
2291
+ properties?: {
2292
+ providerId?: {
2293
+ errors: string[];
2294
+ } | undefined;
2295
+ accountId?: {
2296
+ errors: string[];
2297
+ } | undefined;
2298
+ userId?: {
2299
+ errors: string[];
2300
+ } | undefined;
2301
+ } | undefined;
2302
+ status: 422;
2303
+ statusText: string;
2304
+ };
2305
+ } : never : never)>;
2306
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
2307
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
2308
+ param: infer Param;
2309
+ } ? "/api/auth/refresh-token" : "/api/auth/refresh-token"}${Arg extends {
2310
+ query: infer Query;
2311
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
2312
+ };
2313
+ } & {
2314
+ requestPasswordReset: {
2315
+ $post: <O_1 extends FetchOptions<unknown, {
2316
+ email: string;
2317
+ redirectTo?: string | undefined;
2318
+ }, any, any, {
2319
+ success: true;
2320
+ message?: string | undefined;
2321
+ }>>(args: {
2322
+ json: {
2323
+ email: string;
2324
+ redirectTo?: string | undefined;
2325
+ };
2326
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
2327
+ baseURL: string;
2328
+ fetchOptions: {
2329
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2330
+ };
2331
+ })["fetchOptions"] extends {
2332
+ throw: true;
2333
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
2334
+ baseURL: string;
2335
+ fetchOptions: {
2336
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2337
+ };
2338
+ })["fetchOptions"] extends {
2339
+ throw: true;
2340
+ } ? true : false) ? T_2 extends true ? never : {
2341
+ data: null;
2342
+ error: {
2343
+ success: false;
2344
+ code?: string | undefined;
2345
+ message?: string | undefined;
2346
+ status: 400;
2347
+ statusText: string;
2348
+ };
2349
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2350
+ baseURL: string;
2351
+ fetchOptions: {
2352
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2353
+ };
2354
+ })["fetchOptions"] extends {
2355
+ throw: true;
2356
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
2357
+ baseURL: string;
2358
+ fetchOptions: {
2359
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2360
+ };
2361
+ })["fetchOptions"] extends {
2362
+ throw: true;
2363
+ } ? true : false) ? T_3 extends true ? {
2364
+ success: true;
2365
+ message?: string | undefined;
2366
+ } : {
2367
+ data: {
2368
+ success: true;
2369
+ message?: string | undefined;
2370
+ };
2371
+ error: null;
2372
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2373
+ baseURL: string;
2374
+ fetchOptions: {
2375
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2376
+ };
2377
+ })["fetchOptions"] extends {
2378
+ throw: true;
2379
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
2380
+ baseURL: string;
2381
+ fetchOptions: {
2382
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2383
+ };
2384
+ })["fetchOptions"] extends {
2385
+ throw: true;
2386
+ } ? true : false) ? T_4 extends true ? never : {
2387
+ data: null;
2388
+ error: {
2389
+ success: false;
2390
+ errors: string[];
2391
+ properties?: {
2392
+ email?: {
2393
+ errors: string[];
2394
+ } | undefined;
2395
+ redirectTo?: {
2396
+ errors: string[];
2397
+ } | undefined;
2398
+ } | undefined;
2399
+ status: 422;
2400
+ statusText: string;
2401
+ };
2402
+ } : never : never)>;
2403
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
2404
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
2405
+ param: infer Param;
2406
+ } ? "/api/auth/request-password-reset" : "/api/auth/request-password-reset"}${Arg extends {
2407
+ query: infer Query;
2408
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
2409
+ };
2410
+ } & {
2411
+ resetPassword: {
2412
+ ":token": {
2413
+ $get: <O_1 extends FetchOptions<unknown, any, {
2414
+ callbackURL: string;
2415
+ }, {
2416
+ token: string;
2417
+ }, hono_utils_types89.JSONValue>>(args: {
2418
+ param: {
2419
+ token: string;
2420
+ };
2421
+ } & {
2422
+ query: {
2423
+ callbackURL: string;
2424
+ };
2425
+ }, options?: O_1 | undefined) => Promise<(((C extends undefined ? {} : C) & {
2426
+ baseURL: string;
2427
+ fetchOptions: {
2428
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2429
+ };
2430
+ })["fetchOptions"] extends {
2431
+ throw: true;
2432
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
2433
+ baseURL: string;
2434
+ fetchOptions: {
2435
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2436
+ };
2437
+ })["fetchOptions"] extends {
2438
+ throw: true;
2439
+ } ? true : false) ? T_2 extends true ? hono_utils_types89.JSONValue : {
2440
+ data: hono_utils_types89.JSONValue;
2441
+ error: null;
2442
+ } : never : never>;
2443
+ $url: <const Arg extends {
2444
+ param: {
2445
+ token: string;
2446
+ };
2447
+ query: {
2448
+ callbackURL: string;
2449
+ };
2450
+ } | undefined = undefined>(arg?: Arg | undefined) => URL;
2451
+ $path: <const Arg extends {
2452
+ param: {
2453
+ token: string;
2454
+ };
2455
+ query: {
2456
+ callbackURL: string;
2457
+ };
2458
+ } | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
2459
+ param: infer Param;
2460
+ } ? `${Param extends Record<"token", infer Value extends string> ? ([Value] extends [never] ? false : string extends Value ? false : true) extends true ? `/api/auth/reset-password/${Value}` : "/api/auth/reset-password/:token" : "/api/auth/reset-password/:token"}` : "/api/auth/reset-password/:token"}${Arg extends {
2461
+ query: infer Query;
2462
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
2463
+ };
2464
+ };
2465
+ } & {
2466
+ resetPassword: {
2467
+ $post: <O_1 extends FetchOptions<unknown, {
2468
+ newPassword: string;
2469
+ token?: string | undefined;
2470
+ }, {
2471
+ token?: string | undefined;
2472
+ }, any, {
2473
+ success: true;
2474
+ message?: string | undefined;
2475
+ }>>(args: {
2476
+ json: {
2477
+ newPassword: string;
2478
+ token?: string | undefined;
2479
+ };
2480
+ } & {
2481
+ query: {
2482
+ token?: string | undefined;
2483
+ };
2484
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
2485
+ baseURL: string;
2486
+ fetchOptions: {
2487
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2488
+ };
2489
+ })["fetchOptions"] extends {
2490
+ throw: true;
2491
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
2492
+ baseURL: string;
2493
+ fetchOptions: {
2494
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2495
+ };
2496
+ })["fetchOptions"] extends {
2497
+ throw: true;
2498
+ } ? true : false) ? T_2 extends true ? never : {
2499
+ data: null;
2500
+ error: {
2501
+ success: false;
2502
+ code?: string | undefined;
2503
+ message?: string | undefined;
2504
+ status: 400;
2505
+ statusText: string;
2506
+ };
2507
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2508
+ baseURL: string;
2509
+ fetchOptions: {
2510
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2511
+ };
2512
+ })["fetchOptions"] extends {
2513
+ throw: true;
2514
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
2515
+ baseURL: string;
2516
+ fetchOptions: {
2517
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2518
+ };
2519
+ })["fetchOptions"] extends {
2520
+ throw: true;
2521
+ } ? true : false) ? T_3 extends true ? {
2522
+ success: true;
2523
+ message?: string | undefined;
2524
+ } : {
2525
+ data: {
2526
+ success: true;
2527
+ message?: string | undefined;
2528
+ };
2529
+ error: null;
2530
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2531
+ baseURL: string;
2532
+ fetchOptions: {
2533
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2534
+ };
2535
+ })["fetchOptions"] extends {
2536
+ throw: true;
2537
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
2538
+ baseURL: string;
2539
+ fetchOptions: {
2540
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2541
+ };
2542
+ })["fetchOptions"] extends {
2543
+ throw: true;
2544
+ } ? true : false) ? T_4 extends true ? never : {
2545
+ data: null;
2546
+ error: {
2547
+ success: false;
2548
+ errors: string[];
2549
+ properties?: {
2550
+ newPassword?: {
2551
+ errors: string[];
2552
+ } | undefined;
2553
+ token?: {
2554
+ errors: string[];
2555
+ } | undefined;
2556
+ } | undefined;
2557
+ status: 422;
2558
+ statusText: string;
2559
+ };
2560
+ } : never : never)>;
2561
+ $url: <const Arg extends {
2562
+ query: {
2563
+ token?: string | undefined;
2564
+ };
2565
+ } | undefined = undefined>(arg?: Arg | undefined) => URL;
2566
+ $path: <const Arg extends {
2567
+ query: {
2568
+ token?: string | undefined;
2569
+ };
2570
+ } | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
2571
+ param: infer Param;
2572
+ } ? "/api/auth/reset-password" : "/api/auth/reset-password"}${Arg extends {
2573
+ query: infer Query;
2574
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
2575
+ };
2576
+ } & {
2577
+ revokeOtherSessions: {
2578
+ $post: <O_1 extends FetchOptions<unknown, any, any, any, {
2579
+ success: true;
2580
+ message?: string | undefined;
2581
+ }>>(options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
2582
+ baseURL: string;
2583
+ fetchOptions: {
2584
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2585
+ };
2586
+ })["fetchOptions"] extends {
2587
+ throw: true;
2588
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
2589
+ baseURL: string;
2590
+ fetchOptions: {
2591
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2592
+ };
2593
+ })["fetchOptions"] extends {
2594
+ throw: true;
2595
+ } ? true : false) ? T_2 extends true ? never : {
2596
+ data: null;
2597
+ error: {
2598
+ success: false;
2599
+ code?: string | undefined | undefined;
2600
+ message?: string | undefined | undefined;
2601
+ status: 401;
2602
+ statusText: string;
2603
+ };
2604
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2605
+ baseURL: string;
2606
+ fetchOptions: {
2607
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2608
+ };
2609
+ })["fetchOptions"] extends {
2610
+ throw: true;
2611
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
2612
+ baseURL: string;
2613
+ fetchOptions: {
2614
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2615
+ };
2616
+ })["fetchOptions"] extends {
2617
+ throw: true;
2618
+ } ? true : false) ? T_3 extends true ? {
2619
+ success: true;
2620
+ message?: string | undefined;
2621
+ } : {
2622
+ data: {
2623
+ success: true;
2624
+ message?: string | undefined;
2625
+ };
2626
+ error: null;
2627
+ } : never : never)>;
2628
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
2629
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
2630
+ param: infer Param;
2631
+ } ? "/api/auth/revoke-other-sessions" : "/api/auth/revoke-other-sessions"}${Arg extends {
2632
+ query: infer Query;
2633
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
2634
+ };
2635
+ } & {
2636
+ revokeSession: {
2637
+ $post: <O_1 extends FetchOptions<unknown, {
2638
+ token: string;
2639
+ }, any, any, {
2640
+ success: true;
2641
+ message?: string | undefined;
2642
+ }>>(args: {
2643
+ json: {
2644
+ token: string;
2645
+ };
2646
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
2647
+ baseURL: string;
2648
+ fetchOptions: {
2649
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2650
+ };
2651
+ })["fetchOptions"] extends {
2652
+ throw: true;
2653
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
2654
+ baseURL: string;
2655
+ fetchOptions: {
2656
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2657
+ };
2658
+ })["fetchOptions"] extends {
2659
+ throw: true;
2660
+ } ? true : false) ? T_2 extends true ? never : {
2661
+ data: null;
2662
+ error: {
2663
+ success: false;
2664
+ code?: string | undefined | undefined;
2665
+ message?: string | undefined | undefined;
2666
+ status: 401;
2667
+ statusText: string;
2668
+ };
2669
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2670
+ baseURL: string;
2671
+ fetchOptions: {
2672
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2673
+ };
2674
+ })["fetchOptions"] extends {
2675
+ throw: true;
2676
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
2677
+ baseURL: string;
2678
+ fetchOptions: {
2679
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2680
+ };
2681
+ })["fetchOptions"] extends {
2682
+ throw: true;
2683
+ } ? true : false) ? T_3 extends true ? never : {
2684
+ data: null;
2685
+ error: {
2686
+ success: false;
2687
+ code?: string | undefined;
2688
+ message?: string | undefined;
2689
+ status: 400;
2690
+ statusText: string;
2691
+ };
2692
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2693
+ baseURL: string;
2694
+ fetchOptions: {
2695
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2696
+ };
2697
+ })["fetchOptions"] extends {
2698
+ throw: true;
2699
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
2700
+ baseURL: string;
2701
+ fetchOptions: {
2702
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2703
+ };
2704
+ })["fetchOptions"] extends {
2705
+ throw: true;
2706
+ } ? true : false) ? T_4 extends true ? {
2707
+ success: true;
2708
+ message?: string | undefined;
2709
+ } : {
2710
+ data: {
2711
+ success: true;
2712
+ message?: string | undefined;
2713
+ };
2714
+ error: null;
2715
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2716
+ baseURL: string;
2717
+ fetchOptions: {
2718
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2719
+ };
2720
+ })["fetchOptions"] extends {
2721
+ throw: true;
2722
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
2723
+ baseURL: string;
2724
+ fetchOptions: {
2725
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2726
+ };
2727
+ })["fetchOptions"] extends {
2728
+ throw: true;
2729
+ } ? true : false) ? T_5 extends true ? never : {
2730
+ data: null;
2731
+ error: {
2732
+ success: false;
2733
+ code?: string | undefined;
2734
+ message?: string | undefined;
2735
+ status: 500;
2736
+ statusText: string;
2737
+ };
2738
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2739
+ baseURL: string;
2740
+ fetchOptions: {
2741
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2742
+ };
2743
+ })["fetchOptions"] extends {
2744
+ throw: true;
2745
+ } ? true : false) extends infer T_6 ? T_6 extends (((C extends undefined ? {} : C) & {
2746
+ baseURL: string;
2747
+ fetchOptions: {
2748
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2749
+ };
2750
+ })["fetchOptions"] extends {
2751
+ throw: true;
2752
+ } ? true : false) ? T_6 extends true ? never : {
2753
+ data: null;
2754
+ error: {
2755
+ success: false;
2756
+ code?: string | undefined;
2757
+ message?: string | undefined;
2758
+ status: 401;
2759
+ statusText: string;
2760
+ };
2761
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2762
+ baseURL: string;
2763
+ fetchOptions: {
2764
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2765
+ };
2766
+ })["fetchOptions"] extends {
2767
+ throw: true;
2768
+ } ? true : false) extends infer T_7 ? T_7 extends (((C extends undefined ? {} : C) & {
2769
+ baseURL: string;
2770
+ fetchOptions: {
2771
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2772
+ };
2773
+ })["fetchOptions"] extends {
2774
+ throw: true;
2775
+ } ? true : false) ? T_7 extends true ? never : {
2776
+ data: null;
2777
+ error: {
2778
+ success: false;
2779
+ errors: string[];
2780
+ properties?: {
2781
+ token?: {
2782
+ errors: string[];
2783
+ } | undefined;
2784
+ } | undefined;
2785
+ status: 422;
2786
+ statusText: string;
2787
+ };
2788
+ } : never : never)>;
2789
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
2790
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
2791
+ param: infer Param;
2792
+ } ? "/api/auth/revoke-session" : "/api/auth/revoke-session"}${Arg extends {
2793
+ query: infer Query;
2794
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
2795
+ };
2796
+ } & {
2797
+ revokeSessions: {
2798
+ $post: <O_1 extends FetchOptions<unknown, any, any, any, {
2799
+ success: true;
2800
+ message?: string | undefined;
2801
+ }>>(options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
2802
+ baseURL: string;
2803
+ fetchOptions: {
2804
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2805
+ };
2806
+ })["fetchOptions"] extends {
2807
+ throw: true;
2808
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
2809
+ baseURL: string;
2810
+ fetchOptions: {
2811
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2812
+ };
2813
+ })["fetchOptions"] extends {
2814
+ throw: true;
2815
+ } ? true : false) ? T_2 extends true ? never : {
2816
+ data: null;
2817
+ error: {
2818
+ success: false;
2819
+ code?: string | undefined | undefined;
2820
+ message?: string | undefined | undefined;
2821
+ status: 401;
2822
+ statusText: string;
2823
+ };
2824
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2825
+ baseURL: string;
2826
+ fetchOptions: {
2827
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2828
+ };
2829
+ })["fetchOptions"] extends {
2830
+ throw: true;
2831
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
2832
+ baseURL: string;
2833
+ fetchOptions: {
2834
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2835
+ };
2836
+ })["fetchOptions"] extends {
2837
+ throw: true;
2838
+ } ? true : false) ? T_3 extends true ? {
2839
+ success: true;
2840
+ message?: string | undefined;
2841
+ } : {
2842
+ data: {
2843
+ success: true;
2844
+ message?: string | undefined;
2845
+ };
2846
+ error: null;
2847
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2848
+ baseURL: string;
2849
+ fetchOptions: {
2850
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2851
+ };
2852
+ })["fetchOptions"] extends {
2853
+ throw: true;
2854
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
2855
+ baseURL: string;
2856
+ fetchOptions: {
2857
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2858
+ };
2859
+ })["fetchOptions"] extends {
2860
+ throw: true;
2861
+ } ? true : false) ? T_4 extends true ? never : {
2862
+ data: null;
2863
+ error: {
2864
+ success: false;
2865
+ code?: string | undefined;
2866
+ message?: string | undefined;
2867
+ status: 500;
2868
+ statusText: string;
2869
+ };
2870
+ } : never : never)>;
2871
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
2872
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
2873
+ param: infer Param;
2874
+ } ? "/api/auth/revoke-sessions" : "/api/auth/revoke-sessions"}${Arg extends {
2875
+ query: infer Query;
2876
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
2877
+ };
2878
+ } & {
2879
+ sendVerificationEmail: {
2880
+ $post: <O_1 extends FetchOptions<unknown, {
2881
+ email: string;
2882
+ callbackURL?: string | undefined;
2883
+ }, any, any, {
2884
+ success: true;
2885
+ message?: string | undefined;
2886
+ }>>(args: {
2887
+ json: {
2888
+ email: string;
2889
+ callbackURL?: string | undefined;
2890
+ };
2891
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
2892
+ baseURL: string;
2893
+ fetchOptions: {
2894
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2895
+ };
2896
+ })["fetchOptions"] extends {
2897
+ throw: true;
2898
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
2899
+ baseURL: string;
2900
+ fetchOptions: {
2901
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2902
+ };
2903
+ })["fetchOptions"] extends {
2904
+ throw: true;
2905
+ } ? true : false) ? T_2 extends true ? never : {
2906
+ data: null;
2907
+ error: {
2908
+ success: false;
2909
+ code?: string | undefined;
2910
+ message?: string | undefined;
2911
+ status: 400;
2912
+ statusText: string;
2913
+ };
2914
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2915
+ baseURL: string;
2916
+ fetchOptions: {
2917
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2918
+ };
2919
+ })["fetchOptions"] extends {
2920
+ throw: true;
2921
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
2922
+ baseURL: string;
2923
+ fetchOptions: {
2924
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2925
+ };
2926
+ })["fetchOptions"] extends {
2927
+ throw: true;
2928
+ } ? true : false) ? T_3 extends true ? {
2929
+ success: true;
2930
+ message?: string | undefined;
2931
+ } : {
2932
+ data: {
2933
+ success: true;
2934
+ message?: string | undefined;
2935
+ };
2936
+ error: null;
2937
+ } : never : never) | ((((C extends undefined ? {} : C) & {
2938
+ baseURL: string;
2939
+ fetchOptions: {
2940
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2941
+ };
2942
+ })["fetchOptions"] extends {
2943
+ throw: true;
2944
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
2945
+ baseURL: string;
2946
+ fetchOptions: {
2947
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
2948
+ };
2949
+ })["fetchOptions"] extends {
2950
+ throw: true;
2951
+ } ? true : false) ? T_4 extends true ? never : {
2952
+ data: null;
2953
+ error: {
2954
+ success: false;
2955
+ errors: string[];
2956
+ properties?: {
2957
+ email?: {
2958
+ errors: string[];
2959
+ } | undefined;
2960
+ callbackURL?: {
2961
+ errors: string[];
2962
+ } | undefined;
2963
+ } | undefined;
2964
+ status: 422;
2965
+ statusText: string;
2966
+ };
2967
+ } : never : never)>;
2968
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
2969
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
2970
+ param: infer Param;
2971
+ } ? "/api/auth/send-verification-email" : "/api/auth/send-verification-email"}${Arg extends {
2972
+ query: infer Query;
2973
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
2974
+ };
2975
+ } & {
2976
+ signIn: {
2977
+ email: {
2978
+ $post: <O_1 extends FetchOptions<unknown, {
2979
+ email: string;
2980
+ password: string;
2981
+ callbackURL?: string | undefined;
2982
+ rememberMe?: boolean | undefined;
2983
+ }, any, any, {
2984
+ success: true;
2985
+ data: {
2986
+ success: true;
2987
+ token: string | null;
2988
+ user: {
2989
+ [x: string]: hono_utils_types89.JSONValue;
2990
+ id: string;
2991
+ createdAt: string;
2992
+ updatedAt: string;
2993
+ email: string;
2994
+ emailVerified: boolean;
2995
+ name?: string | undefined | undefined;
2996
+ image?: string | null | undefined | undefined;
2997
+ };
2998
+ redirect: false;
2999
+ url: null;
3000
+ } | {
3001
+ success: true;
3002
+ token: string | null;
3003
+ user: {
3004
+ [x: string]: hono_utils_types89.JSONValue;
3005
+ id: string;
3006
+ createdAt: string;
3007
+ updatedAt: string;
3008
+ email: string;
3009
+ emailVerified: boolean;
3010
+ name?: string | undefined | undefined;
3011
+ image?: string | null | undefined | undefined;
3012
+ };
3013
+ redirect: true;
3014
+ url: string;
3015
+ } | {
3016
+ success: false;
3017
+ token: null;
3018
+ user: null;
3019
+ redirect: false;
3020
+ url: null;
3021
+ } | {
3022
+ success: false;
3023
+ token: null;
3024
+ user: null;
3025
+ redirect: true;
3026
+ url: string;
3027
+ };
3028
+ }>>(args: {
3029
+ json: {
3030
+ email: string;
3031
+ password: string;
3032
+ callbackURL?: string | undefined;
3033
+ rememberMe?: boolean | undefined;
3034
+ };
3035
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
3036
+ baseURL: string;
3037
+ fetchOptions: {
3038
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3039
+ };
3040
+ })["fetchOptions"] extends {
3041
+ throw: true;
3042
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
3043
+ baseURL: string;
3044
+ fetchOptions: {
3045
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3046
+ };
3047
+ })["fetchOptions"] extends {
3048
+ throw: true;
3049
+ } ? true : false) ? T_2 extends true ? never : {
3050
+ data: null;
3051
+ error: {
3052
+ success: false;
3053
+ code?: string | undefined;
3054
+ message?: string | undefined;
3055
+ status: 400;
3056
+ statusText: string;
3057
+ };
3058
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3059
+ baseURL: string;
3060
+ fetchOptions: {
3061
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3062
+ };
3063
+ })["fetchOptions"] extends {
3064
+ throw: true;
3065
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
3066
+ baseURL: string;
3067
+ fetchOptions: {
3068
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3069
+ };
3070
+ })["fetchOptions"] extends {
3071
+ throw: true;
3072
+ } ? true : false) ? T_3 extends true ? {
3073
+ success: true;
3074
+ data: {
3075
+ success: true;
3076
+ token: string | null;
3077
+ user: {
3078
+ [x: string]: hono_utils_types89.JSONValue;
3079
+ id: string;
3080
+ createdAt: string;
3081
+ updatedAt: string;
3082
+ email: string;
3083
+ emailVerified: boolean;
3084
+ name?: string | undefined | undefined;
3085
+ image?: string | null | undefined | undefined;
3086
+ };
3087
+ redirect: false;
3088
+ url: null;
3089
+ } | {
3090
+ success: true;
3091
+ token: string | null;
3092
+ user: {
3093
+ [x: string]: hono_utils_types89.JSONValue;
3094
+ id: string;
3095
+ createdAt: string;
3096
+ updatedAt: string;
3097
+ email: string;
3098
+ emailVerified: boolean;
3099
+ name?: string | undefined | undefined;
3100
+ image?: string | null | undefined | undefined;
3101
+ };
3102
+ redirect: true;
3103
+ url: string;
3104
+ } | {
3105
+ success: false;
3106
+ token: null;
3107
+ user: null;
3108
+ redirect: false;
3109
+ url: null;
3110
+ } | {
3111
+ success: false;
3112
+ token: null;
3113
+ user: null;
3114
+ redirect: true;
3115
+ url: string;
3116
+ };
3117
+ } : {
3118
+ data: {
3119
+ success: true;
3120
+ data: {
3121
+ success: true;
3122
+ token: string | null;
3123
+ user: {
3124
+ [x: string]: hono_utils_types89.JSONValue;
3125
+ id: string;
3126
+ createdAt: string;
3127
+ updatedAt: string;
3128
+ email: string;
3129
+ emailVerified: boolean;
3130
+ name?: string | undefined | undefined;
3131
+ image?: string | null | undefined | undefined;
3132
+ };
3133
+ redirect: false;
3134
+ url: null;
3135
+ } | {
3136
+ success: true;
3137
+ token: string | null;
3138
+ user: {
3139
+ [x: string]: hono_utils_types89.JSONValue;
3140
+ id: string;
3141
+ createdAt: string;
3142
+ updatedAt: string;
3143
+ email: string;
3144
+ emailVerified: boolean;
3145
+ name?: string | undefined | undefined;
3146
+ image?: string | null | undefined | undefined;
3147
+ };
3148
+ redirect: true;
3149
+ url: string;
3150
+ } | {
3151
+ success: false;
3152
+ token: null;
3153
+ user: null;
3154
+ redirect: false;
3155
+ url: null;
3156
+ } | {
3157
+ success: false;
3158
+ token: null;
3159
+ user: null;
3160
+ redirect: true;
3161
+ url: string;
3162
+ };
3163
+ };
3164
+ error: null;
3165
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3166
+ baseURL: string;
3167
+ fetchOptions: {
3168
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3169
+ };
3170
+ })["fetchOptions"] extends {
3171
+ throw: true;
3172
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
3173
+ baseURL: string;
3174
+ fetchOptions: {
3175
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3176
+ };
3177
+ })["fetchOptions"] extends {
3178
+ throw: true;
3179
+ } ? true : false) ? T_4 extends true ? never : {
3180
+ data: null;
3181
+ error: {
3182
+ success: false;
3183
+ code?: string | undefined;
3184
+ message?: string | undefined;
3185
+ status: 500;
3186
+ statusText: string;
3187
+ };
3188
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3189
+ baseURL: string;
3190
+ fetchOptions: {
3191
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3192
+ };
3193
+ })["fetchOptions"] extends {
3194
+ throw: true;
3195
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
3196
+ baseURL: string;
3197
+ fetchOptions: {
3198
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3199
+ };
3200
+ })["fetchOptions"] extends {
3201
+ throw: true;
3202
+ } ? true : false) ? T_5 extends true ? never : {
3203
+ data: null;
3204
+ error: {
3205
+ success: false;
3206
+ code?: string | undefined;
3207
+ message?: string | undefined;
3208
+ status: 401;
3209
+ statusText: string;
3210
+ };
3211
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3212
+ baseURL: string;
3213
+ fetchOptions: {
3214
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3215
+ };
3216
+ })["fetchOptions"] extends {
3217
+ throw: true;
3218
+ } ? true : false) extends infer T_6 ? T_6 extends (((C extends undefined ? {} : C) & {
3219
+ baseURL: string;
3220
+ fetchOptions: {
3221
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3222
+ };
3223
+ })["fetchOptions"] extends {
3224
+ throw: true;
3225
+ } ? true : false) ? T_6 extends true ? never : {
3226
+ data: null;
3227
+ error: {
3228
+ success: false;
3229
+ code?: string | undefined;
3230
+ message?: string | undefined;
3231
+ status: 403;
3232
+ statusText: string;
3233
+ };
3234
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3235
+ baseURL: string;
3236
+ fetchOptions: {
3237
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3238
+ };
3239
+ })["fetchOptions"] extends {
3240
+ throw: true;
3241
+ } ? true : false) extends infer T_7 ? T_7 extends (((C extends undefined ? {} : C) & {
3242
+ baseURL: string;
3243
+ fetchOptions: {
3244
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3245
+ };
3246
+ })["fetchOptions"] extends {
3247
+ throw: true;
3248
+ } ? true : false) ? T_7 extends true ? never : {
3249
+ data: null;
3250
+ error: {
3251
+ success: false;
3252
+ errors: string[];
3253
+ properties?: {
3254
+ email?: {
3255
+ errors: string[];
3256
+ } | undefined;
3257
+ password?: {
3258
+ errors: string[];
3259
+ } | undefined;
3260
+ callbackURL?: {
3261
+ errors: string[];
3262
+ } | undefined;
3263
+ rememberMe?: {
3264
+ errors: string[];
3265
+ } | undefined;
3266
+ } | undefined;
3267
+ status: 422;
3268
+ statusText: string;
3269
+ };
3270
+ } : never : never)>;
3271
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
3272
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
3273
+ param: infer Param;
3274
+ } ? "/api/auth/sign-in/email" : "/api/auth/sign-in/email"}${Arg extends {
3275
+ query: infer Query;
3276
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
3277
+ };
3278
+ };
3279
+ } & {
3280
+ signIn: {
3281
+ social: {
3282
+ $post: <O_1 extends FetchOptions<unknown, {
3283
+ provider: _faire_auth_core_social_providers25.SocialProvider;
3284
+ callbackURL?: string | undefined;
3285
+ newUserCallbackURL?: string | undefined;
3286
+ errorCallbackURL?: string | undefined;
3287
+ disableRedirect?: boolean | undefined;
3288
+ idToken?: {
3289
+ token: string;
3290
+ nonce?: string | undefined;
3291
+ accessToken?: string | undefined;
3292
+ refreshToken?: string | undefined;
3293
+ expiresAt?: number | undefined;
3294
+ } | undefined;
3295
+ scopes?: string[] | undefined;
3296
+ requestSignUp?: boolean | undefined;
3297
+ loginHint?: string | undefined;
3298
+ }, any, any, {
3299
+ success: true;
3300
+ data: {
3301
+ success: true;
3302
+ token: string | null;
3303
+ user: {
3304
+ [x: string]: hono_utils_types89.JSONValue;
3305
+ id: string;
3306
+ createdAt: string;
3307
+ updatedAt: string;
3308
+ email: string;
3309
+ emailVerified: boolean;
3310
+ name?: string | undefined | undefined;
3311
+ image?: string | null | undefined | undefined;
3312
+ };
3313
+ redirect: false;
3314
+ url: null;
3315
+ } | {
3316
+ success: true;
3317
+ token: string | null;
3318
+ user: {
3319
+ [x: string]: hono_utils_types89.JSONValue;
3320
+ id: string;
3321
+ createdAt: string;
3322
+ updatedAt: string;
3323
+ email: string;
3324
+ emailVerified: boolean;
3325
+ name?: string | undefined | undefined;
3326
+ image?: string | null | undefined | undefined;
3327
+ };
3328
+ redirect: true;
3329
+ url: string;
3330
+ } | {
3331
+ success: false;
3332
+ token: null;
3333
+ user: null;
3334
+ redirect: false;
3335
+ url: null;
3336
+ } | {
3337
+ success: false;
3338
+ token: null;
3339
+ user: null;
3340
+ redirect: true;
3341
+ url: string;
3342
+ };
3343
+ }>>(args: {
3344
+ json: {
3345
+ provider: _faire_auth_core_social_providers25.SocialProvider;
3346
+ callbackURL?: string | undefined;
3347
+ newUserCallbackURL?: string | undefined;
3348
+ errorCallbackURL?: string | undefined;
3349
+ disableRedirect?: boolean | undefined;
3350
+ idToken?: {
3351
+ token: string;
3352
+ nonce?: string | undefined;
3353
+ accessToken?: string | undefined;
3354
+ refreshToken?: string | undefined;
3355
+ expiresAt?: number | undefined;
3356
+ } | undefined;
3357
+ scopes?: string[] | undefined;
3358
+ requestSignUp?: boolean | undefined;
3359
+ loginHint?: string | undefined;
3360
+ };
3361
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
3362
+ baseURL: string;
3363
+ fetchOptions: {
3364
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3365
+ };
3366
+ })["fetchOptions"] extends {
3367
+ throw: true;
3368
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
3369
+ baseURL: string;
3370
+ fetchOptions: {
3371
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3372
+ };
3373
+ })["fetchOptions"] extends {
3374
+ throw: true;
3375
+ } ? true : false) ? T_2 extends true ? {
3376
+ success: true;
3377
+ data: {
3378
+ success: true;
3379
+ token: string | null;
3380
+ user: {
3381
+ [x: string]: hono_utils_types89.JSONValue;
3382
+ id: string;
3383
+ createdAt: string;
3384
+ updatedAt: string;
3385
+ email: string;
3386
+ emailVerified: boolean;
3387
+ name?: string | undefined | undefined;
3388
+ image?: string | null | undefined | undefined;
3389
+ };
3390
+ redirect: false;
3391
+ url: null;
3392
+ } | {
3393
+ success: true;
3394
+ token: string | null;
3395
+ user: {
3396
+ [x: string]: hono_utils_types89.JSONValue;
3397
+ id: string;
3398
+ createdAt: string;
3399
+ updatedAt: string;
3400
+ email: string;
3401
+ emailVerified: boolean;
3402
+ name?: string | undefined | undefined;
3403
+ image?: string | null | undefined | undefined;
3404
+ };
3405
+ redirect: true;
3406
+ url: string;
3407
+ } | {
3408
+ success: false;
3409
+ token: null;
3410
+ user: null;
3411
+ redirect: false;
3412
+ url: null;
3413
+ } | {
3414
+ success: false;
3415
+ token: null;
3416
+ user: null;
3417
+ redirect: true;
3418
+ url: string;
3419
+ };
3420
+ } : {
3421
+ data: {
3422
+ success: true;
3423
+ data: {
3424
+ success: true;
3425
+ token: string | null;
3426
+ user: {
3427
+ [x: string]: hono_utils_types89.JSONValue;
3428
+ id: string;
3429
+ createdAt: string;
3430
+ updatedAt: string;
3431
+ email: string;
3432
+ emailVerified: boolean;
3433
+ name?: string | undefined | undefined;
3434
+ image?: string | null | undefined | undefined;
3435
+ };
3436
+ redirect: false;
3437
+ url: null;
3438
+ } | {
3439
+ success: true;
3440
+ token: string | null;
3441
+ user: {
3442
+ [x: string]: hono_utils_types89.JSONValue;
3443
+ id: string;
3444
+ createdAt: string;
3445
+ updatedAt: string;
3446
+ email: string;
3447
+ emailVerified: boolean;
3448
+ name?: string | undefined | undefined;
3449
+ image?: string | null | undefined | undefined;
3450
+ };
3451
+ redirect: true;
3452
+ url: string;
3453
+ } | {
3454
+ success: false;
3455
+ token: null;
3456
+ user: null;
3457
+ redirect: false;
3458
+ url: null;
3459
+ } | {
3460
+ success: false;
3461
+ token: null;
3462
+ user: null;
3463
+ redirect: true;
3464
+ url: string;
3465
+ };
3466
+ };
3467
+ error: null;
3468
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3469
+ baseURL: string;
3470
+ fetchOptions: {
3471
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3472
+ };
3473
+ })["fetchOptions"] extends {
3474
+ throw: true;
3475
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
3476
+ baseURL: string;
3477
+ fetchOptions: {
3478
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3479
+ };
3480
+ })["fetchOptions"] extends {
3481
+ throw: true;
3482
+ } ? true : false) ? T_3 extends true ? never : {
3483
+ data: null;
3484
+ error: {
3485
+ success: false;
3486
+ code?: string | undefined;
3487
+ message?: string | undefined;
3488
+ status: 404;
3489
+ statusText: string;
3490
+ };
3491
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3492
+ baseURL: string;
3493
+ fetchOptions: {
3494
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3495
+ };
3496
+ })["fetchOptions"] extends {
3497
+ throw: true;
3498
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
3499
+ baseURL: string;
3500
+ fetchOptions: {
3501
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3502
+ };
3503
+ })["fetchOptions"] extends {
3504
+ throw: true;
3505
+ } ? true : false) ? T_4 extends true ? never : {
3506
+ data: null;
3507
+ error: {
3508
+ success: false;
3509
+ code?: string | undefined;
3510
+ message?: string | undefined;
3511
+ status: 401;
3512
+ statusText: string;
3513
+ };
3514
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3515
+ baseURL: string;
3516
+ fetchOptions: {
3517
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3518
+ };
3519
+ })["fetchOptions"] extends {
3520
+ throw: true;
3521
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
3522
+ baseURL: string;
3523
+ fetchOptions: {
3524
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3525
+ };
3526
+ })["fetchOptions"] extends {
3527
+ throw: true;
3528
+ } ? true : false) ? T_5 extends true ? never : {
3529
+ data: null;
3530
+ error: {
3531
+ success: false;
3532
+ errors: string[];
3533
+ properties?: {
3534
+ provider?: {
3535
+ errors: string[];
3536
+ } | undefined;
3537
+ callbackURL?: {
3538
+ errors: string[];
3539
+ } | undefined;
3540
+ newUserCallbackURL?: {
3541
+ errors: string[];
3542
+ } | undefined;
3543
+ errorCallbackURL?: {
3544
+ errors: string[];
3545
+ } | undefined;
3546
+ disableRedirect?: {
3547
+ errors: string[];
3548
+ } | undefined;
3549
+ idToken?: {
3550
+ errors: string[];
3551
+ } | {
3552
+ errors: string[];
3553
+ properties?: {
3554
+ token?: {
3555
+ errors: string[];
3556
+ } | undefined;
3557
+ nonce?: {
3558
+ errors: string[];
3559
+ } | undefined;
3560
+ accessToken?: {
3561
+ errors: string[];
3562
+ } | undefined;
3563
+ refreshToken?: {
3564
+ errors: string[];
3565
+ } | undefined;
3566
+ expiresAt?: {
3567
+ errors: string[];
3568
+ } | undefined;
3569
+ } | undefined;
3570
+ } | undefined;
3571
+ scopes?: {
3572
+ errors: string[];
3573
+ } | {
3574
+ errors: string[];
3575
+ items?: {
3576
+ errors: string[];
3577
+ }[] | undefined;
3578
+ } | undefined;
3579
+ requestSignUp?: {
3580
+ errors: string[];
3581
+ } | undefined;
3582
+ loginHint?: {
3583
+ errors: string[];
3584
+ } | undefined;
3585
+ } | undefined;
3586
+ status: 422;
3587
+ statusText: string;
3588
+ };
3589
+ } : never : never)>;
3590
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
3591
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
3592
+ param: infer Param;
3593
+ } ? "/api/auth/sign-in/social" : "/api/auth/sign-in/social"}${Arg extends {
3594
+ query: infer Query;
3595
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
3596
+ };
3597
+ };
3598
+ } & {
3599
+ signOut: {
3600
+ $post: <O_1 extends FetchOptions<unknown, any, any, any, {
3601
+ success: true;
3602
+ message?: string | undefined;
3603
+ }>>(options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
3604
+ baseURL: string;
3605
+ fetchOptions: {
3606
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3607
+ };
3608
+ })["fetchOptions"] extends {
3609
+ throw: true;
3610
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
3611
+ baseURL: string;
3612
+ fetchOptions: {
3613
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3614
+ };
3615
+ })["fetchOptions"] extends {
3616
+ throw: true;
3617
+ } ? true : false) ? T_2 extends true ? never : {
3618
+ data: null;
3619
+ error: {
3620
+ success: false;
3621
+ code?: string | undefined;
3622
+ message?: string | undefined;
3623
+ status: 400;
3624
+ statusText: string;
3625
+ };
3626
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3627
+ baseURL: string;
3628
+ fetchOptions: {
3629
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3630
+ };
3631
+ })["fetchOptions"] extends {
3632
+ throw: true;
3633
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
3634
+ baseURL: string;
3635
+ fetchOptions: {
3636
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3637
+ };
3638
+ })["fetchOptions"] extends {
3639
+ throw: true;
3640
+ } ? true : false) ? T_3 extends true ? {
3641
+ success: true;
3642
+ message?: string | undefined;
3643
+ } : {
3644
+ data: {
3645
+ success: true;
3646
+ message?: string | undefined;
3647
+ };
3648
+ error: null;
3649
+ } : never : never)>;
3650
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
3651
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
3652
+ param: infer Param;
3653
+ } ? "/api/auth/sign-out" : "/api/auth/sign-out"}${Arg extends {
3654
+ query: infer Query;
3655
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
3656
+ };
3657
+ } & {
3658
+ signUp: {
3659
+ email: {
3660
+ $post: <O_1 extends FetchOptions<unknown, {
3661
+ [x: string]: unknown;
3662
+ email: string;
3663
+ password: string;
3664
+ name?: string | undefined;
3665
+ image?: string | null | undefined;
3666
+ callbackURL?: string | undefined;
3667
+ rememberMe?: boolean | undefined;
3668
+ }, any, any, {
3669
+ success: true;
3670
+ data: {
3671
+ success: true;
3672
+ token: string | null;
3673
+ user: {
3674
+ [x: string]: hono_utils_types89.JSONValue;
3675
+ id: string;
3676
+ createdAt: string;
3677
+ updatedAt: string;
3678
+ email: string;
3679
+ emailVerified: boolean;
3680
+ name?: string | undefined | undefined;
3681
+ image?: string | null | undefined | undefined;
3682
+ };
3683
+ redirect: false;
3684
+ url: null;
3685
+ } | {
3686
+ success: true;
3687
+ token: string | null;
3688
+ user: {
3689
+ [x: string]: hono_utils_types89.JSONValue;
3690
+ id: string;
3691
+ createdAt: string;
3692
+ updatedAt: string;
3693
+ email: string;
3694
+ emailVerified: boolean;
3695
+ name?: string | undefined | undefined;
3696
+ image?: string | null | undefined | undefined;
3697
+ };
3698
+ redirect: true;
3699
+ url: string;
3700
+ } | {
3701
+ success: false;
3702
+ token: null;
3703
+ user: null;
3704
+ redirect: false;
3705
+ url: null;
3706
+ } | {
3707
+ success: false;
3708
+ token: null;
3709
+ user: null;
3710
+ redirect: true;
3711
+ url: string;
3712
+ };
3713
+ }>>(args: {
3714
+ json: {
3715
+ [x: string]: unknown;
3716
+ email: string;
3717
+ password: string;
3718
+ name?: string | undefined;
3719
+ image?: string | null | undefined;
3720
+ callbackURL?: string | undefined;
3721
+ rememberMe?: boolean | undefined;
3722
+ };
3723
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
3724
+ baseURL: string;
3725
+ fetchOptions: {
3726
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3727
+ };
3728
+ })["fetchOptions"] extends {
3729
+ throw: true;
3730
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
3731
+ baseURL: string;
3732
+ fetchOptions: {
3733
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3734
+ };
3735
+ })["fetchOptions"] extends {
3736
+ throw: true;
3737
+ } ? true : false) ? T_2 extends true ? never : {
3738
+ data: null;
3739
+ error: {
3740
+ success: false;
3741
+ code?: string | undefined;
3742
+ message?: string | undefined;
3743
+ status: 400;
3744
+ statusText: string;
3745
+ };
3746
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3747
+ baseURL: string;
3748
+ fetchOptions: {
3749
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3750
+ };
3751
+ })["fetchOptions"] extends {
3752
+ throw: true;
3753
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
3754
+ baseURL: string;
3755
+ fetchOptions: {
3756
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3757
+ };
3758
+ })["fetchOptions"] extends {
3759
+ throw: true;
3760
+ } ? true : false) ? T_3 extends true ? {
3761
+ success: true;
3762
+ data: {
3763
+ success: true;
3764
+ token: string | null;
3765
+ user: {
3766
+ [x: string]: hono_utils_types89.JSONValue;
3767
+ id: string;
3768
+ createdAt: string;
3769
+ updatedAt: string;
3770
+ email: string;
3771
+ emailVerified: boolean;
3772
+ name?: string | undefined | undefined;
3773
+ image?: string | null | undefined | undefined;
3774
+ };
3775
+ redirect: false;
3776
+ url: null;
3777
+ } | {
3778
+ success: true;
3779
+ token: string | null;
3780
+ user: {
3781
+ [x: string]: hono_utils_types89.JSONValue;
3782
+ id: string;
3783
+ createdAt: string;
3784
+ updatedAt: string;
3785
+ email: string;
3786
+ emailVerified: boolean;
3787
+ name?: string | undefined | undefined;
3788
+ image?: string | null | undefined | undefined;
3789
+ };
3790
+ redirect: true;
3791
+ url: string;
3792
+ } | {
3793
+ success: false;
3794
+ token: null;
3795
+ user: null;
3796
+ redirect: false;
3797
+ url: null;
3798
+ } | {
3799
+ success: false;
3800
+ token: null;
3801
+ user: null;
3802
+ redirect: true;
3803
+ url: string;
3804
+ };
3805
+ } : {
3806
+ data: {
3807
+ success: true;
3808
+ data: {
3809
+ success: true;
3810
+ token: string | null;
3811
+ user: {
3812
+ [x: string]: hono_utils_types89.JSONValue;
3813
+ id: string;
3814
+ createdAt: string;
3815
+ updatedAt: string;
3816
+ email: string;
3817
+ emailVerified: boolean;
3818
+ name?: string | undefined | undefined;
3819
+ image?: string | null | undefined | undefined;
3820
+ };
3821
+ redirect: false;
3822
+ url: null;
3823
+ } | {
3824
+ success: true;
3825
+ token: string | null;
3826
+ user: {
3827
+ [x: string]: hono_utils_types89.JSONValue;
3828
+ id: string;
3829
+ createdAt: string;
3830
+ updatedAt: string;
3831
+ email: string;
3832
+ emailVerified: boolean;
3833
+ name?: string | undefined | undefined;
3834
+ image?: string | null | undefined | undefined;
3835
+ };
3836
+ redirect: true;
3837
+ url: string;
3838
+ } | {
3839
+ success: false;
3840
+ token: null;
3841
+ user: null;
3842
+ redirect: false;
3843
+ url: null;
3844
+ } | {
3845
+ success: false;
3846
+ token: null;
3847
+ user: null;
3848
+ redirect: true;
3849
+ url: string;
3850
+ };
3851
+ };
3852
+ error: null;
3853
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3854
+ baseURL: string;
3855
+ fetchOptions: {
3856
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3857
+ };
3858
+ })["fetchOptions"] extends {
3859
+ throw: true;
3860
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
3861
+ baseURL: string;
3862
+ fetchOptions: {
3863
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3864
+ };
3865
+ })["fetchOptions"] extends {
3866
+ throw: true;
3867
+ } ? true : false) ? T_4 extends true ? never : {
3868
+ data: null;
3869
+ error: {
3870
+ success: false;
3871
+ errors: string[];
3872
+ properties?: {
3873
+ [x: string]: {
3874
+ errors: string[];
3875
+ } | undefined;
3876
+ email?: {
3877
+ errors: string[];
3878
+ } | undefined;
3879
+ password?: {
3880
+ errors: string[];
3881
+ } | undefined;
3882
+ name?: {
3883
+ errors: string[];
3884
+ } | undefined;
3885
+ image?: {
3886
+ errors: string[];
3887
+ } | undefined;
3888
+ callbackURL?: {
3889
+ errors: string[];
3890
+ } | undefined;
3891
+ rememberMe?: {
3892
+ errors: string[];
3893
+ } | undefined;
3894
+ } | undefined;
3895
+ status: 422;
3896
+ statusText: string;
3897
+ };
3898
+ } : never : never)>;
3899
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
3900
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
3901
+ param: infer Param;
3902
+ } ? "/api/auth/sign-up/email" : "/api/auth/sign-up/email"}${Arg extends {
3903
+ query: infer Query;
3904
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
3905
+ };
3906
+ };
3907
+ } & {
3908
+ unlinkAccount: {
3909
+ $post: <O_1 extends FetchOptions<unknown, {
3910
+ providerId: string;
3911
+ accountId?: string | undefined;
3912
+ }, any, any, {
3913
+ success: true;
3914
+ message?: string | undefined;
3915
+ }>>(args: {
3916
+ json: {
3917
+ providerId: string;
3918
+ accountId?: string | undefined;
3919
+ };
3920
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
3921
+ baseURL: string;
3922
+ fetchOptions: {
3923
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3924
+ };
3925
+ })["fetchOptions"] extends {
3926
+ throw: true;
3927
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
3928
+ baseURL: string;
3929
+ fetchOptions: {
3930
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3931
+ };
3932
+ })["fetchOptions"] extends {
3933
+ throw: true;
3934
+ } ? true : false) ? T_2 extends true ? never : {
3935
+ data: null;
3936
+ error: {
3937
+ success: false;
3938
+ code?: string | undefined | undefined;
3939
+ message?: string | undefined | undefined;
3940
+ status: 401;
3941
+ statusText: string;
3942
+ };
3943
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3944
+ baseURL: string;
3945
+ fetchOptions: {
3946
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3947
+ };
3948
+ })["fetchOptions"] extends {
3949
+ throw: true;
3950
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
3951
+ baseURL: string;
3952
+ fetchOptions: {
3953
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3954
+ };
3955
+ })["fetchOptions"] extends {
3956
+ throw: true;
3957
+ } ? true : false) ? T_3 extends true ? never : {
3958
+ data: null;
3959
+ error: {
3960
+ success: false;
3961
+ code?: string | undefined;
3962
+ message?: string | undefined;
3963
+ status: 400;
3964
+ statusText: string;
3965
+ };
3966
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3967
+ baseURL: string;
3968
+ fetchOptions: {
3969
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3970
+ };
3971
+ })["fetchOptions"] extends {
3972
+ throw: true;
3973
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
3974
+ baseURL: string;
3975
+ fetchOptions: {
3976
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3977
+ };
3978
+ })["fetchOptions"] extends {
3979
+ throw: true;
3980
+ } ? true : false) ? T_4 extends true ? {
3981
+ success: true;
3982
+ message?: string | undefined;
3983
+ } : {
3984
+ data: {
3985
+ success: true;
3986
+ message?: string | undefined;
3987
+ };
3988
+ error: null;
3989
+ } : never : never) | ((((C extends undefined ? {} : C) & {
3990
+ baseURL: string;
3991
+ fetchOptions: {
3992
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
3993
+ };
3994
+ })["fetchOptions"] extends {
3995
+ throw: true;
3996
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
3997
+ baseURL: string;
3998
+ fetchOptions: {
3999
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4000
+ };
4001
+ })["fetchOptions"] extends {
4002
+ throw: true;
4003
+ } ? true : false) ? T_5 extends true ? never : {
4004
+ data: null;
4005
+ error: {
4006
+ success: false;
4007
+ code?: string | undefined | undefined;
4008
+ message?: string | undefined | undefined;
4009
+ status: 403;
4010
+ statusText: string;
4011
+ };
4012
+ } : never : never) | ((((C extends undefined ? {} : C) & {
4013
+ baseURL: string;
4014
+ fetchOptions: {
4015
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4016
+ };
4017
+ })["fetchOptions"] extends {
4018
+ throw: true;
4019
+ } ? true : false) extends infer T_6 ? T_6 extends (((C extends undefined ? {} : C) & {
4020
+ baseURL: string;
4021
+ fetchOptions: {
4022
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4023
+ };
4024
+ })["fetchOptions"] extends {
4025
+ throw: true;
4026
+ } ? true : false) ? T_6 extends true ? never : {
4027
+ data: null;
4028
+ error: {
4029
+ success: false;
4030
+ errors: string[];
4031
+ properties?: {
4032
+ providerId?: {
4033
+ errors: string[];
4034
+ } | undefined;
4035
+ accountId?: {
4036
+ errors: string[];
4037
+ } | undefined;
4038
+ } | undefined;
4039
+ status: 422;
4040
+ statusText: string;
4041
+ };
4042
+ } : never : never)>;
4043
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
4044
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
4045
+ param: infer Param;
4046
+ } ? "/api/auth/unlink-account" : "/api/auth/unlink-account"}${Arg extends {
4047
+ query: infer Query;
4048
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
4049
+ };
4050
+ } & {
4051
+ updateUser: {
4052
+ $post: <O_1 extends FetchOptions<unknown, {
4053
+ [x: string]: unknown;
4054
+ name?: string | undefined;
4055
+ image?: string | null | undefined;
4056
+ }, any, any, {
4057
+ success: true;
4058
+ message?: string | undefined;
4059
+ }>>(args: {
4060
+ json: {
4061
+ [x: string]: unknown;
4062
+ name?: string | undefined;
4063
+ image?: string | null | undefined;
4064
+ };
4065
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
4066
+ baseURL: string;
4067
+ fetchOptions: {
4068
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4069
+ };
4070
+ })["fetchOptions"] extends {
4071
+ throw: true;
4072
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
4073
+ baseURL: string;
4074
+ fetchOptions: {
4075
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4076
+ };
4077
+ })["fetchOptions"] extends {
4078
+ throw: true;
4079
+ } ? true : false) ? T_2 extends true ? never : {
4080
+ data: null;
4081
+ error: {
4082
+ success: false;
4083
+ code?: string | undefined | undefined;
4084
+ message?: string | undefined | undefined;
4085
+ status: 401;
4086
+ statusText: string;
4087
+ };
4088
+ } : never : never) | ((((C extends undefined ? {} : C) & {
4089
+ baseURL: string;
4090
+ fetchOptions: {
4091
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4092
+ };
4093
+ })["fetchOptions"] extends {
4094
+ throw: true;
4095
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
4096
+ baseURL: string;
4097
+ fetchOptions: {
4098
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4099
+ };
4100
+ })["fetchOptions"] extends {
4101
+ throw: true;
4102
+ } ? true : false) ? T_3 extends true ? {
4103
+ success: true;
4104
+ message?: string | undefined;
4105
+ } : {
4106
+ data: {
4107
+ success: true;
4108
+ message?: string | undefined;
4109
+ };
4110
+ error: null;
4111
+ } : never : never) | ((((C extends undefined ? {} : C) & {
4112
+ baseURL: string;
4113
+ fetchOptions: {
4114
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4115
+ };
4116
+ })["fetchOptions"] extends {
4117
+ throw: true;
4118
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
4119
+ baseURL: string;
4120
+ fetchOptions: {
4121
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4122
+ };
4123
+ })["fetchOptions"] extends {
4124
+ throw: true;
4125
+ } ? true : false) ? T_4 extends true ? never : {
4126
+ data: null;
4127
+ error: {
4128
+ success: false;
4129
+ code?: string | undefined;
4130
+ message?: string | undefined;
4131
+ status: 500;
4132
+ statusText: string;
4133
+ };
4134
+ } : never : never) | ((((C extends undefined ? {} : C) & {
4135
+ baseURL: string;
4136
+ fetchOptions: {
4137
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4138
+ };
4139
+ })["fetchOptions"] extends {
4140
+ throw: true;
4141
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
4142
+ baseURL: string;
4143
+ fetchOptions: {
4144
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4145
+ };
4146
+ })["fetchOptions"] extends {
4147
+ throw: true;
4148
+ } ? true : false) ? T_5 extends true ? never : {
4149
+ data: null;
4150
+ error: {
4151
+ success: false;
4152
+ errors: string[];
4153
+ properties?: {
4154
+ [x: string]: {
4155
+ errors: string[];
4156
+ } | undefined;
4157
+ name?: {
4158
+ errors: string[];
4159
+ } | undefined;
4160
+ image?: {
4161
+ errors: string[];
4162
+ } | undefined;
4163
+ } | undefined;
4164
+ status: 422;
4165
+ statusText: string;
4166
+ };
4167
+ } : never : never)>;
4168
+ $url: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => URL;
4169
+ $path: <const Arg extends {} | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
4170
+ param: infer Param;
4171
+ } ? "/api/auth/update-user" : "/api/auth/update-user"}${Arg extends {
4172
+ query: infer Query;
4173
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
4174
+ };
4175
+ } & {
4176
+ verifyEmail: {
4177
+ $get: <O_1 extends FetchOptions<unknown, any, {
4178
+ token: string;
4179
+ callbackURL?: string | undefined;
4180
+ }, any, {
4181
+ success: true;
4182
+ data: {
4183
+ success: true;
4184
+ token: string | null;
4185
+ user: {
4186
+ [x: string]: hono_utils_types89.JSONValue;
4187
+ id: string;
4188
+ createdAt: string;
4189
+ updatedAt: string;
4190
+ email: string;
4191
+ emailVerified: boolean;
4192
+ name?: string | undefined | undefined;
4193
+ image?: string | null | undefined | undefined;
4194
+ };
4195
+ } | {
4196
+ success: false;
4197
+ token: null;
4198
+ user: null;
4199
+ };
4200
+ }>>(args: {
4201
+ query: {
4202
+ token: string;
4203
+ callbackURL?: string | undefined;
4204
+ };
4205
+ }, options?: O_1 | undefined) => Promise<((((C extends undefined ? {} : C) & {
4206
+ baseURL: string;
4207
+ fetchOptions: {
4208
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4209
+ };
4210
+ })["fetchOptions"] extends {
4211
+ throw: true;
4212
+ } ? true : false) extends infer T_2 ? T_2 extends (((C extends undefined ? {} : C) & {
4213
+ baseURL: string;
4214
+ fetchOptions: {
4215
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4216
+ };
4217
+ })["fetchOptions"] extends {
4218
+ throw: true;
4219
+ } ? true : false) ? T_2 extends true ? never : {
4220
+ data: null;
4221
+ error: {
4222
+ success: false;
4223
+ code?: string | undefined;
4224
+ message?: string | undefined;
4225
+ status: 500;
4226
+ statusText: string;
4227
+ };
4228
+ } : never : never) | ((((C extends undefined ? {} : C) & {
4229
+ baseURL: string;
4230
+ fetchOptions: {
4231
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4232
+ };
4233
+ })["fetchOptions"] extends {
4234
+ throw: true;
4235
+ } ? true : false) extends infer T_3 ? T_3 extends (((C extends undefined ? {} : C) & {
4236
+ baseURL: string;
4237
+ fetchOptions: {
4238
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4239
+ };
4240
+ })["fetchOptions"] extends {
4241
+ throw: true;
4242
+ } ? true : false) ? T_3 extends true ? never : {
4243
+ data: null;
4244
+ error: {
4245
+ success: false;
4246
+ code?: string | undefined;
4247
+ message?: string | undefined;
4248
+ status: 401;
4249
+ statusText: string;
4250
+ };
4251
+ } : never : never) | ((((C extends undefined ? {} : C) & {
4252
+ baseURL: string;
4253
+ fetchOptions: {
4254
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4255
+ };
4256
+ })["fetchOptions"] extends {
4257
+ throw: true;
4258
+ } ? true : false) extends infer T_4 ? T_4 extends (((C extends undefined ? {} : C) & {
4259
+ baseURL: string;
4260
+ fetchOptions: {
4261
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4262
+ };
4263
+ })["fetchOptions"] extends {
4264
+ throw: true;
4265
+ } ? true : false) ? T_4 extends true ? never : {
4266
+ data: null;
4267
+ error: {
4268
+ success: false;
4269
+ code: string;
4270
+ message: string;
4271
+ status: 400;
4272
+ statusText: string;
4273
+ };
4274
+ } : never : never) | ((((C extends undefined ? {} : C) & {
4275
+ baseURL: string;
4276
+ fetchOptions: {
4277
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4278
+ };
4279
+ })["fetchOptions"] extends {
4280
+ throw: true;
4281
+ } ? true : false) extends infer T_5 ? T_5 extends (((C extends undefined ? {} : C) & {
4282
+ baseURL: string;
4283
+ fetchOptions: {
4284
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4285
+ };
4286
+ })["fetchOptions"] extends {
4287
+ throw: true;
4288
+ } ? true : false) ? T_5 extends true ? never : {
4289
+ data: null;
4290
+ error: {
4291
+ success: false;
4292
+ code: string;
4293
+ message: string;
4294
+ status: 401;
4295
+ statusText: string;
4296
+ };
4297
+ } : never : never) | ((((C extends undefined ? {} : C) & {
4298
+ baseURL: string;
4299
+ fetchOptions: {
4300
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4301
+ };
4302
+ })["fetchOptions"] extends {
4303
+ throw: true;
4304
+ } ? true : false) extends infer T_6 ? T_6 extends (((C extends undefined ? {} : C) & {
4305
+ baseURL: string;
4306
+ fetchOptions: {
4307
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4308
+ };
4309
+ })["fetchOptions"] extends {
4310
+ throw: true;
4311
+ } ? true : false) ? T_6 extends true ? {
4312
+ success: true;
4313
+ data: {
4314
+ success: true;
4315
+ token: string | null;
4316
+ user: {
4317
+ [x: string]: hono_utils_types89.JSONValue;
4318
+ id: string;
4319
+ createdAt: string;
4320
+ updatedAt: string;
4321
+ email: string;
4322
+ emailVerified: boolean;
4323
+ name?: string | undefined | undefined;
4324
+ image?: string | null | undefined | undefined;
4325
+ };
4326
+ } | {
4327
+ success: false;
4328
+ token: null;
4329
+ user: null;
4330
+ };
4331
+ } : {
4332
+ data: {
4333
+ success: true;
4334
+ data: {
4335
+ success: true;
4336
+ token: string | null;
4337
+ user: {
4338
+ [x: string]: hono_utils_types89.JSONValue;
4339
+ id: string;
4340
+ createdAt: string;
4341
+ updatedAt: string;
4342
+ email: string;
4343
+ emailVerified: boolean;
4344
+ name?: string | undefined | undefined;
4345
+ image?: string | null | undefined | undefined;
4346
+ };
4347
+ } | {
4348
+ success: false;
4349
+ token: null;
4350
+ user: null;
4351
+ };
4352
+ };
4353
+ error: null;
4354
+ } : never : never) | ((((C extends undefined ? {} : C) & {
4355
+ baseURL: string;
4356
+ fetchOptions: {
4357
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4358
+ };
4359
+ })["fetchOptions"] extends {
4360
+ throw: true;
4361
+ } ? true : false) extends infer T_7 ? T_7 extends (((C extends undefined ? {} : C) & {
4362
+ baseURL: string;
4363
+ fetchOptions: {
4364
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4365
+ };
4366
+ })["fetchOptions"] extends {
4367
+ throw: true;
4368
+ } ? true : false) ? T_7 extends true ? never : {
4369
+ data: null;
4370
+ error: {
4371
+ success: false;
4372
+ errors: string[];
4373
+ properties?: {
4374
+ token?: {
4375
+ errors: string[];
4376
+ } | undefined;
4377
+ callbackURL?: {
4378
+ errors: string[];
4379
+ } | undefined;
4380
+ } | undefined;
4381
+ status: 422;
4382
+ statusText: string;
4383
+ };
4384
+ } : never : never)>;
4385
+ $url: <const Arg extends {
4386
+ query: {
4387
+ token: string;
4388
+ callbackURL?: string | undefined;
4389
+ };
4390
+ } | undefined = undefined>(arg?: Arg | undefined) => URL;
4391
+ $path: <const Arg extends {
4392
+ query: {
4393
+ token: string;
4394
+ callbackURL?: string | undefined;
4395
+ };
4396
+ } | undefined = undefined>(arg?: Arg | undefined) => `${Arg extends {
4397
+ param: infer Param;
4398
+ } ? "/api/auth/verify-email" : "/api/auth/verify-email"}${Arg extends {
4399
+ query: infer Query;
4400
+ } ? (keyof Query extends never ? true : false) extends true ? "" : `?${string}` : ""}`;
4401
+ };
4402
+ } & InferActions<(C extends undefined ? {} : C) & {
4403
+ baseURL: string;
4404
+ fetchOptions: {
4405
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4406
+ };
4407
+ }> & {
4408
+ useSession: nanostores11.Atom<{
4409
+ data: {
4410
+ session: {
4411
+ [x: string]: hono_utils_types89.JSONValue;
4412
+ createdAt: string;
4413
+ updatedAt: string;
4414
+ userId: string;
4415
+ expiresAt: string;
4416
+ token: string;
4417
+ id?: string | undefined | undefined;
4418
+ ipAddress?: string | null | undefined | undefined;
4419
+ userAgent?: string | null | undefined | undefined;
4420
+ };
4421
+ user: {
4422
+ [x: string]: hono_utils_types89.JSONValue;
4423
+ id: string;
4424
+ createdAt: string;
4425
+ updatedAt: string;
4426
+ email: string;
4427
+ emailVerified: boolean;
4428
+ name?: string | undefined | undefined;
4429
+ image?: string | null | undefined | undefined;
4430
+ };
4431
+ } | null;
4432
+ error: _better_fetch_fetch49.BetterFetchError | null;
4433
+ isPending: boolean;
4434
+ }>;
4435
+ $fetch: _better_fetch_fetch49.BetterFetch<{
4436
+ plugins: (_better_fetch_fetch49.BetterFetchPlugin | {
4437
+ id: string;
4438
+ name: string;
4439
+ hooks: {};
4440
+ })[];
4441
+ method: string;
4442
+ output?: _better_fetch_fetch49.StandardSchemaV1 | typeof Blob | typeof File;
4443
+ query?: any;
4444
+ baseURL: string;
4445
+ headers?: HeadersInit & (HeadersInit | {
4446
+ accept: "application/json" | "text/plain" | "application/octet-stream";
4447
+ "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
4448
+ authorization: "Bearer" | "Basic";
4449
+ });
4450
+ redirect?: RequestRedirect;
4451
+ params?: any;
4452
+ body?: any;
4453
+ throw?: boolean;
4454
+ auth?: {
4455
+ type: "Bearer";
4456
+ token: string | Promise<string | undefined> | (() => string | Promise<string | undefined> | undefined) | undefined;
4457
+ } | {
4458
+ type: "Basic";
4459
+ username: string | (() => string | undefined) | undefined;
4460
+ password: string | (() => string | undefined) | undefined;
4461
+ } | {
4462
+ type: "Custom";
4463
+ prefix: string | (() => string | undefined) | undefined;
4464
+ value: string | (() => string | undefined) | undefined;
4465
+ };
4466
+ window?: null;
4467
+ cache?: RequestCache;
4468
+ credentials?: RequestCredentials;
4469
+ integrity?: string;
4470
+ keepalive?: boolean;
4471
+ mode?: RequestMode;
4472
+ priority?: RequestPriority;
4473
+ referrer?: string;
4474
+ referrerPolicy?: ReferrerPolicy;
4475
+ signal?: AbortSignal | null;
4476
+ onRetry?: (response: _better_fetch_fetch49.ResponseContext) => Promise<void> | void;
4477
+ hookOptions?: {
4478
+ cloneResponse?: boolean;
4479
+ };
4480
+ timeout?: number;
4481
+ duplex?: "full" | "half";
4482
+ jsonParser: (text: string) => Promise<any> | any;
4483
+ retry?: _better_fetch_fetch49.RetryOptions;
4484
+ retryAttempt?: number;
4485
+ errorSchema?: _better_fetch_fetch49.StandardSchemaV1;
4486
+ disableValidation?: boolean;
4487
+ catchAllError?: boolean;
4488
+ defaultOutput?: _better_fetch_fetch49.StandardSchemaV1;
4489
+ defaultError?: _better_fetch_fetch49.StandardSchemaV1;
4490
+ schema?: _better_fetch_fetch49.Schema;
4491
+ customFetchImpl: any;
4492
+ }, unknown, unknown, _better_fetch_fetch49.Schema>;
4493
+ $store: {
4494
+ notify: (signal?: _faire_auth_core_types76.LiteralStringUnion<"$sessionSignal">) => void;
4495
+ listen: (signal: _faire_auth_core_types76.LiteralStringUnion<"$sessionSignal">, listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
4496
+ atoms: {
4497
+ session: nanostores11.PreinitializedWritableAtom<{
4498
+ data: {
4499
+ user: _faire_auth_core_db12.User;
4500
+ session: _faire_auth_core_db12.Session;
4501
+ } | null;
4502
+ error: _better_fetch_fetch49.BetterFetchError | null;
4503
+ isPending: boolean;
4504
+ isRefetching: boolean;
4505
+ refetch: () => void;
4506
+ }> & object;
4507
+ $sessionSignal: nanostores11.PreinitializedWritableAtom<boolean> & object;
4508
+ } & Record<string, nanostores11.WritableAtom<any>>;
4509
+ };
4510
+ $Infer: {
4511
+ Session: {
4512
+ session: {
4513
+ [x: string]: hono_utils_types89.JSONValue;
4514
+ createdAt: string;
4515
+ updatedAt: string;
4516
+ userId: string;
4517
+ expiresAt: string;
4518
+ token: string;
4519
+ id?: string | undefined | undefined;
4520
+ ipAddress?: string | null | undefined | undefined;
4521
+ userAgent?: string | null | undefined | undefined;
4522
+ };
4523
+ user: {
4524
+ [x: string]: hono_utils_types89.JSONValue;
4525
+ id: string;
4526
+ createdAt: string;
4527
+ updatedAt: string;
4528
+ email: string;
4529
+ emailVerified: boolean;
4530
+ name?: string | undefined | undefined;
4531
+ image?: string | null | undefined | undefined;
4532
+ };
4533
+ };
4534
+ };
4535
+ $ERROR_CODES: InferErrorCodes<(C extends undefined ? {} : C) & {
4536
+ baseURL: string;
4537
+ fetchOptions: {
4538
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4539
+ };
4540
+ }> & {
4541
+ USER_NOT_FOUND: string;
4542
+ FAILED_TO_CREATE_USER: string;
4543
+ FAILED_TO_CREATE_SESSION: string;
4544
+ FAILED_TO_UPDATE_USER: string;
4545
+ FAILED_TO_GET_SESSION: string;
4546
+ INVALID_PASSWORD: string;
4547
+ INVALID_EMAIL: string;
4548
+ INVALID_EMAIL_OR_PASSWORD: string;
4549
+ SOCIAL_ACCOUNT_ALREADY_LINKED: string;
4550
+ PROVIDER_NOT_FOUND: string;
4551
+ INVALID_TOKEN: string;
4552
+ ID_TOKEN_NOT_SUPPORTED: string;
4553
+ FAILED_TO_GET_USER_INFO: string;
4554
+ USER_EMAIL_NOT_FOUND: string;
4555
+ EMAIL_NOT_VERIFIED: string;
4556
+ PASSWORD_TOO_SHORT: string;
4557
+ PASSWORD_TOO_LONG: string;
4558
+ USER_ALREADY_EXISTS: string;
4559
+ EMAIL_CAN_NOT_BE_UPDATED: string;
4560
+ CREDENTIAL_ACCOUNT_NOT_FOUND: string;
4561
+ SESSION_EXPIRED: string;
4562
+ FAILED_TO_UNLINK_LAST_ACCOUNT: string;
4563
+ ACCOUNT_NOT_FOUND: string;
4564
+ USER_ALREADY_HAS_PASSWORD: string;
4565
+ } extends infer T_2 ? { [P in keyof T_2 as P extends never ? never : P]: T_2[P] } : never;
4566
+ };
4567
+ testUser: DisableTestUser extends true ? undefined : TestUser;
4568
+ signIn: () => Promise<SignInResult>;
4569
+ createUser: <SignIn extends boolean = true>(signInUser?: SignIn, userOverrides?: Partial<TestUser>) => Promise<false extends SignIn ? TestUser : RepeatableSignInResult>;
4570
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4571
+ $Infer: {
4572
+ app: <O_1 extends FaireAuthOptions$1>(_o: O_1) => InferApp<O_1>;
4573
+ api: <A extends AnyHono>(_a: A) => InferAPI<A>;
4574
+ client: <A extends AnyHono>(_a: A) => InferClient<A, (C extends undefined ? {} : C) & {
4575
+ baseURL: string;
4576
+ fetchOptions: {
4577
+ customFetchImpl: (url: Request | string | URL, init?: RequestInit) => Promise<Response>;
4578
+ };
4579
+ }>;
4580
+ };
4581
+ db: _faire_auth_core_db12.DBAdapter<FaireAuthOptions$1>;
4582
+ }>;
4583
+ //#endregion
4584
+ export { createTestEndpoint, getTestInstance };