@orthograph/host-cloudflare 0.0.0-stage → 0.1.0-next.2

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 (135) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +2 -2
  3. package/dist/index.d.ts +21 -0
  4. package/dist/index.js +12 -0
  5. package/dist/modules/actors/internal/tables.d.ts +1 -0
  6. package/dist/modules/actors/internal/tables.js +5 -0
  7. package/dist/modules/actors/service.d.ts +18 -0
  8. package/dist/modules/actors/service.js +51 -0
  9. package/dist/modules/actors/types.d.ts +35 -0
  10. package/dist/modules/actors/types.js +1 -0
  11. package/dist/modules/auth/internal/instance.d.ts +4462 -0
  12. package/dist/modules/auth/internal/instance.js +36 -0
  13. package/dist/modules/auth/internal/oauth.d.ts +20 -0
  14. package/dist/modules/auth/internal/oauth.js +70 -0
  15. package/dist/modules/auth/internal/options.d.ts +4886 -0
  16. package/dist/modules/auth/internal/options.js +75 -0
  17. package/dist/modules/auth/internal/schema.d.ts +2 -0
  18. package/dist/modules/auth/internal/schema.js +41 -0
  19. package/dist/modules/auth/internal/world-token.d.ts +15 -0
  20. package/dist/modules/auth/internal/world-token.js +40 -0
  21. package/dist/modules/auth/service.d.ts +9 -0
  22. package/dist/modules/auth/service.js +96 -0
  23. package/dist/modules/auth/types.d.ts +75 -0
  24. package/dist/modules/auth/types.js +1 -0
  25. package/dist/modules/clock/internal/date.d.ts +17 -0
  26. package/dist/modules/clock/internal/date.js +45 -0
  27. package/dist/modules/clock/internal/door.d.ts +2 -0
  28. package/dist/modules/clock/internal/door.js +49 -0
  29. package/dist/modules/clock/internal/state.d.ts +5 -0
  30. package/dist/modules/clock/internal/state.js +78 -0
  31. package/dist/modules/clock/service.d.ts +2 -0
  32. package/dist/modules/clock/service.js +36 -0
  33. package/dist/modules/clock/types.d.ts +152 -0
  34. package/dist/modules/clock/types.js +1 -0
  35. package/dist/modules/database/service.d.ts +2 -0
  36. package/dist/modules/database/service.js +6 -0
  37. package/dist/modules/database/types.d.ts +7 -0
  38. package/dist/modules/database/types.js +1 -0
  39. package/dist/modules/follower/internal/entries.d.ts +9 -0
  40. package/dist/modules/follower/internal/entries.js +20 -0
  41. package/dist/modules/follower/internal/health.d.ts +18 -0
  42. package/dist/modules/follower/internal/health.js +27 -0
  43. package/dist/modules/follower/internal/outbox.d.ts +26 -0
  44. package/dist/modules/follower/internal/outbox.js +35 -0
  45. package/dist/modules/follower/internal/poll.d.ts +21 -0
  46. package/dist/modules/follower/internal/poll.js +23 -0
  47. package/dist/modules/follower/service.d.ts +31 -0
  48. package/dist/modules/follower/service.js +87 -0
  49. package/dist/modules/follower/types.d.ts +71 -0
  50. package/dist/modules/follower/types.js +4 -0
  51. package/dist/modules/inbound/internal/accept.d.ts +26 -0
  52. package/dist/modules/inbound/internal/accept.js +10 -0
  53. package/dist/modules/inbound/internal/read.d.ts +10 -0
  54. package/dist/modules/inbound/internal/read.js +26 -0
  55. package/dist/modules/inbound/internal/same.d.ts +1 -0
  56. package/dist/modules/inbound/internal/same.js +12 -0
  57. package/dist/modules/inbound/internal/verify.d.ts +6 -0
  58. package/dist/modules/inbound/internal/verify.js +57 -0
  59. package/dist/modules/inbound/service.d.ts +2 -0
  60. package/dist/modules/inbound/service.js +110 -0
  61. package/dist/modules/inbound/types.d.ts +28 -0
  62. package/dist/modules/inbound/types.js +1 -0
  63. package/dist/modules/journal/service.d.ts +2 -0
  64. package/dist/modules/journal/service.js +23 -0
  65. package/dist/modules/journal/types.d.ts +8 -0
  66. package/dist/modules/journal/types.js +1 -0
  67. package/dist/modules/relayer/internal/adopt.d.ts +19 -0
  68. package/dist/modules/relayer/internal/adopt.js +34 -0
  69. package/dist/modules/relayer/internal/check.d.ts +16 -0
  70. package/dist/modules/relayer/internal/check.js +141 -0
  71. package/dist/modules/relayer/internal/health.d.ts +5 -0
  72. package/dist/modules/relayer/internal/health.js +7 -0
  73. package/dist/modules/relayer/internal/live.d.ts +26 -0
  74. package/dist/modules/relayer/internal/live.js +25 -0
  75. package/dist/modules/relayer/internal/relay.d.ts +22 -0
  76. package/dist/modules/relayer/internal/relay.js +44 -0
  77. package/dist/modules/relayer/internal/store.d.ts +41 -0
  78. package/dist/modules/relayer/internal/store.js +44 -0
  79. package/dist/modules/relayer/service.d.ts +58 -0
  80. package/dist/modules/relayer/service.js +124 -0
  81. package/dist/modules/relayer/types.d.ts +75 -0
  82. package/dist/modules/relayer/types.js +1 -0
  83. package/dist/modules/store/internal/actors.d.ts +6 -0
  84. package/dist/modules/store/internal/actors.js +24 -0
  85. package/dist/modules/store/internal/commit.d.ts +10 -0
  86. package/dist/modules/store/internal/commit.js +57 -0
  87. package/dist/modules/store/internal/list.d.ts +10 -0
  88. package/dist/modules/store/internal/list.js +28 -0
  89. package/dist/modules/store/internal/rows.d.ts +14 -0
  90. package/dist/modules/store/internal/rows.js +29 -0
  91. package/dist/modules/store/internal/unique.d.ts +3 -0
  92. package/dist/modules/store/internal/unique.js +17 -0
  93. package/dist/modules/store/service.d.ts +2 -0
  94. package/dist/modules/store/service.js +71 -0
  95. package/dist/modules/store/types.d.ts +36 -0
  96. package/dist/modules/store/types.js +1 -0
  97. package/dist/modules/telemetry/internal/exporters.d.ts +21 -0
  98. package/dist/modules/telemetry/internal/exporters.js +66 -0
  99. package/dist/modules/telemetry/service.d.ts +2 -0
  100. package/dist/modules/telemetry/service.js +52 -0
  101. package/dist/modules/telemetry/types.d.ts +36 -0
  102. package/dist/modules/telemetry/types.js +1 -0
  103. package/dist/modules/timers/internal/controller.d.ts +13 -0
  104. package/dist/modules/timers/internal/controller.js +63 -0
  105. package/dist/modules/timers/internal/count.d.ts +39 -0
  106. package/dist/modules/timers/internal/count.js +105 -0
  107. package/dist/modules/timers/internal/limits.d.ts +4 -0
  108. package/dist/modules/timers/internal/limits.js +8 -0
  109. package/dist/modules/timers/internal/table.d.ts +52 -0
  110. package/dist/modules/timers/internal/table.js +181 -0
  111. package/dist/modules/timers/service.d.ts +12 -0
  112. package/dist/modules/timers/service.js +136 -0
  113. package/dist/modules/timers/types.d.ts +82 -0
  114. package/dist/modules/timers/types.js +1 -0
  115. package/dist/modules/world/internal/entry.d.ts +34 -0
  116. package/dist/modules/world/internal/entry.js +69 -0
  117. package/dist/modules/world/internal/facts.d.ts +5 -0
  118. package/dist/modules/world/internal/facts.js +31 -0
  119. package/dist/modules/world/internal/fence.d.ts +9 -0
  120. package/dist/modules/world/internal/fence.js +90 -0
  121. package/dist/modules/world/internal/front-door.d.ts +5 -0
  122. package/dist/modules/world/internal/front-door.js +50 -0
  123. package/dist/modules/world/internal/leases.d.ts +33 -0
  124. package/dist/modules/world/internal/leases.js +79 -0
  125. package/dist/modules/world/internal/reset.d.ts +6 -0
  126. package/dist/modules/world/internal/reset.js +24 -0
  127. package/dist/modules/world/internal/work.d.ts +11 -0
  128. package/dist/modules/world/internal/work.js +73 -0
  129. package/dist/modules/world/internal/worlds.d.ts +7 -0
  130. package/dist/modules/world/internal/worlds.js +48 -0
  131. package/dist/modules/world/service.d.ts +80 -0
  132. package/dist/modules/world/service.js +209 -0
  133. package/dist/modules/world/types.d.ts +47 -0
  134. package/dist/modules/world/types.js +1 -0
  135. package/package.json +46 -3
@@ -0,0 +1,4462 @@
1
+ import type { AuthInstance, AuthOptions } from "../types.ts";
2
+ /** An instance that knows its origin names it, so OAuth's issuer and the MCP resource are that address; else a placeholder. */
3
+ declare const make: (o: AuthOptions, origin: string | undefined) => import("better-auth").Auth<{
4
+ emailAndPassword: {
5
+ enabled: true;
6
+ };
7
+ user: {
8
+ modelName: "auth_user";
9
+ };
10
+ session: {
11
+ modelName: "auth_session";
12
+ };
13
+ account: {
14
+ modelName: "auth_account";
15
+ };
16
+ verification: {
17
+ modelName: "auth_verification";
18
+ };
19
+ advanced: {
20
+ database: {
21
+ generateId: ({ model }: {
22
+ model: string;
23
+ }) => string;
24
+ };
25
+ };
26
+ rateLimit: {
27
+ enabled: false;
28
+ };
29
+ disabledPaths: string[];
30
+ plugins: [{
31
+ id: "bearer";
32
+ version: string;
33
+ hooks: {
34
+ before: {
35
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
36
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
37
+ context: {
38
+ headers: Headers;
39
+ };
40
+ } | undefined>>;
41
+ }[];
42
+ after: {
43
+ matcher(context: import("better-auth").HookEndpointContext): true;
44
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>;
45
+ }[];
46
+ };
47
+ options: import("better-auth/plugins").BearerOptions | undefined;
48
+ }, {
49
+ id: "api-key";
50
+ version: string;
51
+ $ERROR_CODES: {
52
+ INVALID_METADATA_TYPE: import("better-auth").RawError<"INVALID_METADATA_TYPE">;
53
+ REFILL_AMOUNT_AND_INTERVAL_REQUIRED: import("better-auth").RawError<"REFILL_AMOUNT_AND_INTERVAL_REQUIRED">;
54
+ REFILL_INTERVAL_AND_AMOUNT_REQUIRED: import("better-auth").RawError<"REFILL_INTERVAL_AND_AMOUNT_REQUIRED">;
55
+ USER_BANNED: import("better-auth").RawError<"USER_BANNED">;
56
+ UNAUTHORIZED_SESSION: import("better-auth").RawError<"UNAUTHORIZED_SESSION">;
57
+ KEY_NOT_FOUND: import("better-auth").RawError<"KEY_NOT_FOUND">;
58
+ KEY_DISABLED: import("better-auth").RawError<"KEY_DISABLED">;
59
+ KEY_EXPIRED: import("better-auth").RawError<"KEY_EXPIRED">;
60
+ USAGE_EXCEEDED: import("better-auth").RawError<"USAGE_EXCEEDED">;
61
+ KEY_NOT_RECOVERABLE: import("better-auth").RawError<"KEY_NOT_RECOVERABLE">;
62
+ EXPIRES_IN_IS_TOO_SMALL: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_SMALL">;
63
+ EXPIRES_IN_IS_TOO_LARGE: import("better-auth").RawError<"EXPIRES_IN_IS_TOO_LARGE">;
64
+ INVALID_REMAINING: import("better-auth").RawError<"INVALID_REMAINING">;
65
+ INVALID_PREFIX_LENGTH: import("better-auth").RawError<"INVALID_PREFIX_LENGTH">;
66
+ INVALID_NAME_LENGTH: import("better-auth").RawError<"INVALID_NAME_LENGTH">;
67
+ METADATA_DISABLED: import("better-auth").RawError<"METADATA_DISABLED">;
68
+ RATE_LIMIT_EXCEEDED: import("better-auth").RawError<"RATE_LIMIT_EXCEEDED">;
69
+ NO_VALUES_TO_UPDATE: import("better-auth").RawError<"NO_VALUES_TO_UPDATE">;
70
+ KEY_DISABLED_EXPIRATION: import("better-auth").RawError<"KEY_DISABLED_EXPIRATION">;
71
+ INVALID_API_KEY: import("better-auth").RawError<"INVALID_API_KEY">;
72
+ INVALID_USER_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_USER_ID_FROM_API_KEY">;
73
+ INVALID_REFERENCE_ID_FROM_API_KEY: import("better-auth").RawError<"INVALID_REFERENCE_ID_FROM_API_KEY">;
74
+ INVALID_API_KEY_GETTER_RETURN_TYPE: import("better-auth").RawError<"INVALID_API_KEY_GETTER_RETURN_TYPE">;
75
+ SERVER_ONLY_PROPERTY: import("better-auth").RawError<"SERVER_ONLY_PROPERTY">;
76
+ FAILED_TO_UPDATE_API_KEY: import("better-auth").RawError<"FAILED_TO_UPDATE_API_KEY">;
77
+ NAME_REQUIRED: import("better-auth").RawError<"NAME_REQUIRED">;
78
+ ORGANIZATION_ID_REQUIRED: import("better-auth").RawError<"ORGANIZATION_ID_REQUIRED">;
79
+ USER_NOT_MEMBER_OF_ORGANIZATION: import("better-auth").RawError<"USER_NOT_MEMBER_OF_ORGANIZATION">;
80
+ INSUFFICIENT_API_KEY_PERMISSIONS: import("better-auth").RawError<"INSUFFICIENT_API_KEY_PERMISSIONS">;
81
+ NO_DEFAULT_API_KEY_CONFIGURATION_FOUND: import("better-auth").RawError<"NO_DEFAULT_API_KEY_CONFIGURATION_FOUND">;
82
+ ORGANIZATION_PLUGIN_REQUIRED: import("better-auth").RawError<"ORGANIZATION_PLUGIN_REQUIRED">;
83
+ };
84
+ hooks: {
85
+ before: {
86
+ matcher: (ctx: import("better-auth").HookEndpointContext) => boolean;
87
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
88
+ user: {
89
+ id: string;
90
+ createdAt: Date;
91
+ updatedAt: Date;
92
+ email: string;
93
+ emailVerified: boolean;
94
+ name: string;
95
+ image?: string | null | undefined;
96
+ };
97
+ session: {
98
+ id: string;
99
+ token: string;
100
+ userId: string;
101
+ userAgent: string | null;
102
+ ipAddress: string | null;
103
+ createdAt: Date;
104
+ updatedAt: Date;
105
+ expiresAt: Date;
106
+ };
107
+ } | {
108
+ context: import("better-auth").MiddlewareContext<import("better-auth").MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
109
+ options: import("better-auth").BetterAuthOptions;
110
+ trustedOrigins: string[];
111
+ trustedProviders: string[];
112
+ isTrustedOrigin: (url: string, settings?: {
113
+ allowRelativePaths: boolean;
114
+ }) => boolean;
115
+ oauthConfig: {
116
+ skipStateCookieCheck?: boolean | undefined;
117
+ storeStateStrategy: "database" | "cookie";
118
+ };
119
+ newSession: {
120
+ session: {
121
+ id: string;
122
+ createdAt: Date;
123
+ updatedAt: Date;
124
+ userId: string;
125
+ expiresAt: Date;
126
+ token: string;
127
+ ipAddress?: string | null | undefined;
128
+ userAgent?: string | null | undefined;
129
+ } & Record<string, any>;
130
+ user: {
131
+ id: string;
132
+ createdAt: Date;
133
+ updatedAt: Date;
134
+ email: string;
135
+ emailVerified: boolean;
136
+ name: string;
137
+ image?: string | null | undefined;
138
+ } & Record<string, any>;
139
+ } | null;
140
+ session: {
141
+ session: {
142
+ id: string;
143
+ createdAt: Date;
144
+ updatedAt: Date;
145
+ userId: string;
146
+ expiresAt: Date;
147
+ token: string;
148
+ ipAddress?: string | null | undefined;
149
+ userAgent?: string | null | undefined;
150
+ } & Record<string, any>;
151
+ user: {
152
+ id: string;
153
+ createdAt: Date;
154
+ updatedAt: Date;
155
+ email: string;
156
+ emailVerified: boolean;
157
+ name: string;
158
+ image?: string | null | undefined;
159
+ } & Record<string, any>;
160
+ } | null;
161
+ setNewSession: (session: {
162
+ session: {
163
+ id: string;
164
+ createdAt: Date;
165
+ updatedAt: Date;
166
+ userId: string;
167
+ expiresAt: Date;
168
+ token: string;
169
+ ipAddress?: string | null | undefined;
170
+ userAgent?: string | null | undefined;
171
+ } & Record<string, any>;
172
+ user: {
173
+ id: string;
174
+ createdAt: Date;
175
+ updatedAt: Date;
176
+ email: string;
177
+ emailVerified: boolean;
178
+ name: string;
179
+ image?: string | null | undefined;
180
+ } & Record<string, any>;
181
+ } | null) => void;
182
+ socialProviders: import("better-auth").OAuthProvider[];
183
+ authCookies: import("better-auth").BetterAuthCookies;
184
+ logger: ReturnType<typeof import("better-auth").createLogger>;
185
+ rateLimit: {
186
+ enabled: boolean;
187
+ window: number;
188
+ max: number;
189
+ storage: "memory" | "database" | "secondary-storage";
190
+ } & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
191
+ adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
192
+ checkSchema?: import("@better-auth/core/db/internal").SchemaCheck | undefined;
193
+ explicitSchemaCheck?: import("@better-auth/core/db/internal").SchemaCheck | undefined;
194
+ internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
195
+ createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-auth").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
196
+ secret: string;
197
+ secretConfig: string | import("better-auth").SecretConfig;
198
+ sessionConfig: {
199
+ updateAge: number;
200
+ expiresIn: number;
201
+ freshAge: number;
202
+ cookieCacheSigner?: import("better-auth").CookieCacheSigner | undefined;
203
+ cookieRefreshCache: false | {
204
+ enabled: true;
205
+ updateAge: number;
206
+ };
207
+ };
208
+ generateId: (options: {
209
+ model: import("better-auth").ModelNames;
210
+ size?: number | undefined;
211
+ }) => string | false;
212
+ secondaryStorage: import("better-auth").SecondaryStorage | undefined;
213
+ password: {
214
+ hash: (password: string) => Promise<string>;
215
+ verify: (data: {
216
+ password: string;
217
+ hash: string;
218
+ }) => Promise<boolean>;
219
+ config: {
220
+ minPasswordLength: number;
221
+ maxPasswordLength: number;
222
+ };
223
+ checkPassword: (userId: string, ctx: import("better-auth").GenericEndpointContext<import("better-auth").BetterAuthOptions>) => Promise<boolean>;
224
+ };
225
+ tables: import("better-auth").BetterAuthDBSchema;
226
+ runMigrations: () => Promise<void>;
227
+ publishTelemetry: (event: {
228
+ type: string;
229
+ anonymousId?: string | undefined;
230
+ payload: Record<string, any>;
231
+ }) => Promise<void>;
232
+ skipOriginCheck: boolean | string[];
233
+ skipCSRFCheck: boolean;
234
+ runInBackground: (promise: Promise<unknown>) => void;
235
+ runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
236
+ } & {
237
+ returned?: unknown | undefined;
238
+ responseHeaders?: Headers | undefined;
239
+ }>;
240
+ }>>;
241
+ }[];
242
+ };
243
+ endpoints: {
244
+ createApiKey: import("better-auth").StrictEndpoint<"/api-key/create", {
245
+ method: "POST";
246
+ body: import("better-auth").ZodObject<{
247
+ configId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
248
+ name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
249
+ expiresIn: import("better-auth").ZodDefault<import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodNumber>>>;
250
+ prefix: import("better-auth").ZodOptional<import("better-auth").ZodString>;
251
+ remaining: import("better-auth").ZodDefault<import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodNumber>>>;
252
+ metadata: import("better-auth").ZodOptional<import("better-auth").ZodAny>;
253
+ refillAmount: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
254
+ refillInterval: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
255
+ rateLimitTimeWindow: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
256
+ rateLimitMax: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
257
+ rateLimitEnabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
258
+ permissions: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>>;
259
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodCoercedString<unknown>>;
260
+ organizationId: import("better-auth").ZodOptional<import("better-auth").ZodCoercedString<unknown>>;
261
+ }, import("zod/v4/core").$strip>;
262
+ metadata: {
263
+ openapi: {
264
+ description: string;
265
+ responses: {
266
+ "200": {
267
+ description: string;
268
+ content: {
269
+ "application/json": {
270
+ schema: {
271
+ type: "object";
272
+ properties: {
273
+ id: {
274
+ type: string;
275
+ description: string;
276
+ };
277
+ createdAt: {
278
+ type: string;
279
+ format: string;
280
+ description: string;
281
+ };
282
+ updatedAt: {
283
+ type: string;
284
+ format: string;
285
+ description: string;
286
+ };
287
+ name: {
288
+ type: string;
289
+ nullable: boolean;
290
+ description: string;
291
+ };
292
+ prefix: {
293
+ type: string;
294
+ nullable: boolean;
295
+ description: string;
296
+ };
297
+ start: {
298
+ type: string;
299
+ nullable: boolean;
300
+ description: string;
301
+ };
302
+ key: {
303
+ type: string;
304
+ description: string;
305
+ };
306
+ enabled: {
307
+ type: string;
308
+ description: string;
309
+ };
310
+ expiresAt: {
311
+ type: string;
312
+ format: string;
313
+ nullable: boolean;
314
+ description: string;
315
+ };
316
+ referenceId: {
317
+ type: string;
318
+ description: string;
319
+ };
320
+ lastRefillAt: {
321
+ type: string;
322
+ format: string;
323
+ nullable: boolean;
324
+ description: string;
325
+ };
326
+ lastRequest: {
327
+ type: string;
328
+ format: string;
329
+ nullable: boolean;
330
+ description: string;
331
+ };
332
+ metadata: {
333
+ type: string;
334
+ nullable: boolean;
335
+ additionalProperties: boolean;
336
+ description: string;
337
+ };
338
+ rateLimitMax: {
339
+ type: string;
340
+ nullable: boolean;
341
+ description: string;
342
+ };
343
+ rateLimitTimeWindow: {
344
+ type: string;
345
+ nullable: boolean;
346
+ description: string;
347
+ };
348
+ remaining: {
349
+ type: string;
350
+ nullable: boolean;
351
+ description: string;
352
+ };
353
+ refillAmount: {
354
+ type: string;
355
+ nullable: boolean;
356
+ description: string;
357
+ };
358
+ refillInterval: {
359
+ type: string;
360
+ nullable: boolean;
361
+ description: string;
362
+ };
363
+ rateLimitEnabled: {
364
+ type: string;
365
+ description: string;
366
+ };
367
+ requestCount: {
368
+ type: string;
369
+ description: string;
370
+ };
371
+ permissions: {
372
+ type: string;
373
+ nullable: boolean;
374
+ additionalProperties: {
375
+ type: string;
376
+ items: {
377
+ type: string;
378
+ };
379
+ };
380
+ description: string;
381
+ };
382
+ };
383
+ required: string[];
384
+ };
385
+ };
386
+ };
387
+ };
388
+ };
389
+ };
390
+ };
391
+ }, {
392
+ key: string;
393
+ metadata: any;
394
+ permissions: any;
395
+ id: string;
396
+ configId: string;
397
+ name: string | null;
398
+ start: string | null;
399
+ prefix: string | null;
400
+ referenceId: string;
401
+ refillInterval: number | null;
402
+ refillAmount: number | null;
403
+ lastRefillAt: Date | null;
404
+ enabled: boolean;
405
+ rateLimitEnabled: boolean;
406
+ rateLimitTimeWindow: number | null;
407
+ rateLimitMax: number | null;
408
+ requestCount: number;
409
+ remaining: number | null;
410
+ lastRequest: Date | null;
411
+ expiresAt: Date | null;
412
+ createdAt: Date;
413
+ updatedAt: Date;
414
+ }>;
415
+ verifyApiKey: import("better-auth").StrictEndpoint<string, {
416
+ method: "POST";
417
+ body: import("better-auth").ZodObject<{
418
+ configId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
419
+ key: import("better-auth").ZodString;
420
+ permissions: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>>;
421
+ }, import("zod/v4/core").$strip>;
422
+ }, {
423
+ valid: boolean;
424
+ error: {
425
+ message: import("better-auth").RawError<"INVALID_API_KEY">;
426
+ code: "KEY_NOT_FOUND";
427
+ };
428
+ key: null;
429
+ } | {
430
+ valid: boolean;
431
+ error: {
432
+ message: string | undefined;
433
+ code: string;
434
+ cause?: unknown;
435
+ };
436
+ key: null;
437
+ } | {
438
+ valid: boolean;
439
+ error: {
440
+ message: import("better-auth").RawError<"INVALID_API_KEY">;
441
+ code: "INVALID_API_KEY";
442
+ };
443
+ key: null;
444
+ } | {
445
+ valid: boolean;
446
+ error: null;
447
+ key: Omit<import("@better-auth/api-key").ApiKey, "key"> | null;
448
+ }>;
449
+ getApiKey: import("better-auth").StrictEndpoint<"/api-key/get", {
450
+ method: "GET";
451
+ query: import("better-auth").ZodObject<{
452
+ configId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
453
+ id: import("better-auth").ZodString;
454
+ }, import("zod/v4/core").$strip>;
455
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
456
+ session: {
457
+ session: Record<string, any> & {
458
+ id: string;
459
+ createdAt: Date;
460
+ updatedAt: Date;
461
+ userId: string;
462
+ expiresAt: Date;
463
+ token: string;
464
+ ipAddress?: string | null | undefined;
465
+ userAgent?: string | null | undefined;
466
+ };
467
+ user: Record<string, any> & {
468
+ id: string;
469
+ createdAt: Date;
470
+ updatedAt: Date;
471
+ email: string;
472
+ emailVerified: boolean;
473
+ name: string;
474
+ image?: string | null | undefined;
475
+ };
476
+ };
477
+ }>>[];
478
+ metadata: {
479
+ openapi: {
480
+ description: string;
481
+ responses: {
482
+ "200": {
483
+ description: string;
484
+ content: {
485
+ "application/json": {
486
+ schema: {
487
+ type: "object";
488
+ properties: {
489
+ id: {
490
+ type: string;
491
+ description: string;
492
+ };
493
+ name: {
494
+ type: string;
495
+ nullable: boolean;
496
+ description: string;
497
+ };
498
+ start: {
499
+ type: string;
500
+ nullable: boolean;
501
+ description: string;
502
+ };
503
+ prefix: {
504
+ type: string;
505
+ nullable: boolean;
506
+ description: string;
507
+ };
508
+ userId: {
509
+ type: string;
510
+ description: string;
511
+ };
512
+ refillInterval: {
513
+ type: string;
514
+ nullable: boolean;
515
+ description: string;
516
+ };
517
+ refillAmount: {
518
+ type: string;
519
+ nullable: boolean;
520
+ description: string;
521
+ };
522
+ lastRefillAt: {
523
+ type: string;
524
+ format: string;
525
+ nullable: boolean;
526
+ description: string;
527
+ };
528
+ enabled: {
529
+ type: string;
530
+ description: string;
531
+ default: boolean;
532
+ };
533
+ rateLimitEnabled: {
534
+ type: string;
535
+ description: string;
536
+ };
537
+ rateLimitTimeWindow: {
538
+ type: string;
539
+ nullable: boolean;
540
+ description: string;
541
+ };
542
+ rateLimitMax: {
543
+ type: string;
544
+ nullable: boolean;
545
+ description: string;
546
+ };
547
+ requestCount: {
548
+ type: string;
549
+ description: string;
550
+ };
551
+ remaining: {
552
+ type: string;
553
+ nullable: boolean;
554
+ description: string;
555
+ };
556
+ lastRequest: {
557
+ type: string;
558
+ format: string;
559
+ nullable: boolean;
560
+ description: string;
561
+ };
562
+ expiresAt: {
563
+ type: string;
564
+ format: string;
565
+ nullable: boolean;
566
+ description: string;
567
+ };
568
+ createdAt: {
569
+ type: string;
570
+ format: string;
571
+ description: string;
572
+ };
573
+ updatedAt: {
574
+ type: string;
575
+ format: string;
576
+ description: string;
577
+ };
578
+ metadata: {
579
+ type: string;
580
+ nullable: boolean;
581
+ additionalProperties: boolean;
582
+ description: string;
583
+ };
584
+ permissions: {
585
+ type: string;
586
+ nullable: boolean;
587
+ description: string;
588
+ };
589
+ };
590
+ required: string[];
591
+ };
592
+ };
593
+ };
594
+ };
595
+ };
596
+ };
597
+ };
598
+ }, {
599
+ metadata: Record<string, any> | null;
600
+ permissions: {
601
+ [key: string]: string[];
602
+ } | null;
603
+ id: string;
604
+ configId: string;
605
+ name: string | null;
606
+ start: string | null;
607
+ prefix: string | null;
608
+ referenceId: string;
609
+ refillInterval: number | null;
610
+ refillAmount: number | null;
611
+ lastRefillAt: Date | null;
612
+ enabled: boolean;
613
+ rateLimitEnabled: boolean;
614
+ rateLimitTimeWindow: number | null;
615
+ rateLimitMax: number | null;
616
+ requestCount: number;
617
+ remaining: number | null;
618
+ lastRequest: Date | null;
619
+ expiresAt: Date | null;
620
+ createdAt: Date;
621
+ updatedAt: Date;
622
+ }>;
623
+ updateApiKey: import("better-auth").StrictEndpoint<"/api-key/update", {
624
+ method: "POST";
625
+ body: import("better-auth").ZodObject<{
626
+ configId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
627
+ keyId: import("better-auth").ZodString;
628
+ userId: import("better-auth").ZodOptional<import("better-auth").ZodCoercedString<unknown>>;
629
+ name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
630
+ enabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
631
+ remaining: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
632
+ refillAmount: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
633
+ refillInterval: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
634
+ metadata: import("better-auth").ZodOptional<import("better-auth").ZodAny>;
635
+ expiresIn: import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodNumber>>;
636
+ rateLimitEnabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
637
+ rateLimitTimeWindow: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
638
+ rateLimitMax: import("better-auth").ZodOptional<import("better-auth").ZodNumber>;
639
+ permissions: import("better-auth").ZodNullable<import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>>>>;
640
+ }, import("zod/v4/core").$strip>;
641
+ metadata: {
642
+ openapi: {
643
+ description: string;
644
+ responses: {
645
+ "200": {
646
+ description: string;
647
+ content: {
648
+ "application/json": {
649
+ schema: {
650
+ type: "object";
651
+ properties: {
652
+ id: {
653
+ type: string;
654
+ description: string;
655
+ };
656
+ name: {
657
+ type: string;
658
+ nullable: boolean;
659
+ description: string;
660
+ };
661
+ start: {
662
+ type: string;
663
+ nullable: boolean;
664
+ description: string;
665
+ };
666
+ prefix: {
667
+ type: string;
668
+ nullable: boolean;
669
+ description: string;
670
+ };
671
+ userId: {
672
+ type: string;
673
+ description: string;
674
+ };
675
+ refillInterval: {
676
+ type: string;
677
+ nullable: boolean;
678
+ description: string;
679
+ };
680
+ refillAmount: {
681
+ type: string;
682
+ nullable: boolean;
683
+ description: string;
684
+ };
685
+ lastRefillAt: {
686
+ type: string;
687
+ format: string;
688
+ nullable: boolean;
689
+ description: string;
690
+ };
691
+ enabled: {
692
+ type: string;
693
+ description: string;
694
+ default: boolean;
695
+ };
696
+ rateLimitEnabled: {
697
+ type: string;
698
+ description: string;
699
+ };
700
+ rateLimitTimeWindow: {
701
+ type: string;
702
+ nullable: boolean;
703
+ description: string;
704
+ };
705
+ rateLimitMax: {
706
+ type: string;
707
+ nullable: boolean;
708
+ description: string;
709
+ };
710
+ requestCount: {
711
+ type: string;
712
+ description: string;
713
+ };
714
+ remaining: {
715
+ type: string;
716
+ nullable: boolean;
717
+ description: string;
718
+ };
719
+ lastRequest: {
720
+ type: string;
721
+ format: string;
722
+ nullable: boolean;
723
+ description: string;
724
+ };
725
+ expiresAt: {
726
+ type: string;
727
+ format: string;
728
+ nullable: boolean;
729
+ description: string;
730
+ };
731
+ createdAt: {
732
+ type: string;
733
+ format: string;
734
+ description: string;
735
+ };
736
+ updatedAt: {
737
+ type: string;
738
+ format: string;
739
+ description: string;
740
+ };
741
+ metadata: {
742
+ type: string;
743
+ nullable: boolean;
744
+ additionalProperties: boolean;
745
+ description: string;
746
+ };
747
+ permissions: {
748
+ type: string;
749
+ nullable: boolean;
750
+ description: string;
751
+ };
752
+ };
753
+ required: string[];
754
+ };
755
+ };
756
+ };
757
+ };
758
+ };
759
+ };
760
+ };
761
+ }, {
762
+ metadata: Record<string, any> | null;
763
+ permissions: {
764
+ [key: string]: string[];
765
+ } | null;
766
+ id: string;
767
+ configId: string;
768
+ name: string | null;
769
+ start: string | null;
770
+ prefix: string | null;
771
+ referenceId: string;
772
+ refillInterval: number | null;
773
+ refillAmount: number | null;
774
+ lastRefillAt: Date | null;
775
+ enabled: boolean;
776
+ rateLimitEnabled: boolean;
777
+ rateLimitTimeWindow: number | null;
778
+ rateLimitMax: number | null;
779
+ requestCount: number;
780
+ remaining: number | null;
781
+ lastRequest: Date | null;
782
+ expiresAt: Date | null;
783
+ createdAt: Date;
784
+ updatedAt: Date;
785
+ }>;
786
+ deleteApiKey: import("better-auth").StrictEndpoint<"/api-key/delete", {
787
+ method: "POST";
788
+ body: import("better-auth").ZodObject<{
789
+ configId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
790
+ keyId: import("better-auth").ZodString;
791
+ }, import("zod/v4/core").$strip>;
792
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
793
+ session: {
794
+ session: Record<string, any> & {
795
+ id: string;
796
+ createdAt: Date;
797
+ updatedAt: Date;
798
+ userId: string;
799
+ expiresAt: Date;
800
+ token: string;
801
+ ipAddress?: string | null | undefined;
802
+ userAgent?: string | null | undefined;
803
+ };
804
+ user: Record<string, any> & {
805
+ id: string;
806
+ createdAt: Date;
807
+ updatedAt: Date;
808
+ email: string;
809
+ emailVerified: boolean;
810
+ name: string;
811
+ image?: string | null | undefined;
812
+ };
813
+ };
814
+ }>>[];
815
+ metadata: {
816
+ openapi: {
817
+ description: string;
818
+ requestBody: {
819
+ content: {
820
+ "application/json": {
821
+ schema: {
822
+ type: "object";
823
+ properties: {
824
+ keyId: {
825
+ type: string;
826
+ description: string;
827
+ };
828
+ };
829
+ required: string[];
830
+ };
831
+ };
832
+ };
833
+ };
834
+ responses: {
835
+ "200": {
836
+ description: string;
837
+ content: {
838
+ "application/json": {
839
+ schema: {
840
+ type: "object";
841
+ properties: {
842
+ success: {
843
+ type: string;
844
+ description: string;
845
+ };
846
+ };
847
+ required: string[];
848
+ };
849
+ };
850
+ };
851
+ };
852
+ };
853
+ };
854
+ };
855
+ }, {
856
+ success: boolean;
857
+ }>;
858
+ listApiKeys: import("better-auth").StrictEndpoint<"/api-key/list", {
859
+ method: "GET";
860
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
861
+ session: {
862
+ session: Record<string, any> & {
863
+ id: string;
864
+ createdAt: Date;
865
+ updatedAt: Date;
866
+ userId: string;
867
+ expiresAt: Date;
868
+ token: string;
869
+ ipAddress?: string | null | undefined;
870
+ userAgent?: string | null | undefined;
871
+ };
872
+ user: Record<string, any> & {
873
+ id: string;
874
+ createdAt: Date;
875
+ updatedAt: Date;
876
+ email: string;
877
+ emailVerified: boolean;
878
+ name: string;
879
+ image?: string | null | undefined;
880
+ };
881
+ };
882
+ }>>[];
883
+ query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
884
+ configId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
885
+ organizationId: import("better-auth").ZodOptional<import("better-auth").ZodString>;
886
+ limit: import("better-auth").ZodOptional<import("better-auth").ZodCoercedNumber<unknown>>;
887
+ offset: import("better-auth").ZodOptional<import("better-auth").ZodCoercedNumber<unknown>>;
888
+ sortBy: import("better-auth").ZodOptional<import("better-auth").ZodString>;
889
+ sortDirection: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
890
+ asc: "asc";
891
+ desc: "desc";
892
+ }>>;
893
+ }, import("zod/v4/core").$strip>>;
894
+ metadata: {
895
+ openapi: {
896
+ description: string;
897
+ responses: {
898
+ "200": {
899
+ description: string;
900
+ content: {
901
+ "application/json": {
902
+ schema: {
903
+ type: "object";
904
+ properties: {
905
+ apiKeys: {
906
+ type: string;
907
+ items: {
908
+ type: string;
909
+ properties: {
910
+ id: {
911
+ type: string;
912
+ description: string;
913
+ };
914
+ name: {
915
+ type: string;
916
+ nullable: boolean;
917
+ description: string;
918
+ };
919
+ start: {
920
+ type: string;
921
+ nullable: boolean;
922
+ description: string;
923
+ };
924
+ prefix: {
925
+ type: string;
926
+ nullable: boolean;
927
+ description: string;
928
+ };
929
+ userId: {
930
+ type: string;
931
+ description: string;
932
+ };
933
+ refillInterval: {
934
+ type: string;
935
+ nullable: boolean;
936
+ description: string;
937
+ };
938
+ refillAmount: {
939
+ type: string;
940
+ nullable: boolean;
941
+ description: string;
942
+ };
943
+ lastRefillAt: {
944
+ type: string;
945
+ format: string;
946
+ nullable: boolean;
947
+ description: string;
948
+ };
949
+ enabled: {
950
+ type: string;
951
+ description: string;
952
+ default: boolean;
953
+ };
954
+ rateLimitEnabled: {
955
+ type: string;
956
+ description: string;
957
+ };
958
+ rateLimitTimeWindow: {
959
+ type: string;
960
+ nullable: boolean;
961
+ description: string;
962
+ };
963
+ rateLimitMax: {
964
+ type: string;
965
+ nullable: boolean;
966
+ description: string;
967
+ };
968
+ requestCount: {
969
+ type: string;
970
+ description: string;
971
+ };
972
+ remaining: {
973
+ type: string;
974
+ nullable: boolean;
975
+ description: string;
976
+ };
977
+ lastRequest: {
978
+ type: string;
979
+ format: string;
980
+ nullable: boolean;
981
+ description: string;
982
+ };
983
+ expiresAt: {
984
+ type: string;
985
+ format: string;
986
+ nullable: boolean;
987
+ description: string;
988
+ };
989
+ createdAt: {
990
+ type: string;
991
+ format: string;
992
+ description: string;
993
+ };
994
+ updatedAt: {
995
+ type: string;
996
+ format: string;
997
+ description: string;
998
+ };
999
+ metadata: {
1000
+ type: string;
1001
+ nullable: boolean;
1002
+ additionalProperties: boolean;
1003
+ description: string;
1004
+ };
1005
+ permissions: {
1006
+ type: string;
1007
+ nullable: boolean;
1008
+ description: string;
1009
+ };
1010
+ };
1011
+ required: string[];
1012
+ };
1013
+ };
1014
+ total: {
1015
+ type: string;
1016
+ description: string;
1017
+ };
1018
+ limit: {
1019
+ type: string;
1020
+ nullable: boolean;
1021
+ description: string;
1022
+ };
1023
+ offset: {
1024
+ type: string;
1025
+ nullable: boolean;
1026
+ description: string;
1027
+ };
1028
+ };
1029
+ required: string[];
1030
+ };
1031
+ };
1032
+ };
1033
+ };
1034
+ };
1035
+ };
1036
+ };
1037
+ }, {
1038
+ apiKeys: {
1039
+ metadata: Record<string, any> | null;
1040
+ permissions: {
1041
+ [key: string]: string[];
1042
+ } | null;
1043
+ id: string;
1044
+ configId: string;
1045
+ name: string | null;
1046
+ start: string | null;
1047
+ prefix: string | null;
1048
+ referenceId: string;
1049
+ refillInterval: number | null;
1050
+ refillAmount: number | null;
1051
+ lastRefillAt: Date | null;
1052
+ enabled: boolean;
1053
+ rateLimitEnabled: boolean;
1054
+ rateLimitTimeWindow: number | null;
1055
+ rateLimitMax: number | null;
1056
+ requestCount: number;
1057
+ remaining: number | null;
1058
+ lastRequest: Date | null;
1059
+ expiresAt: Date | null;
1060
+ createdAt: Date;
1061
+ updatedAt: Date;
1062
+ }[];
1063
+ total: number;
1064
+ limit: number | undefined;
1065
+ offset: number | undefined;
1066
+ }>;
1067
+ deleteAllExpiredApiKeys: import("better-auth").StrictEndpoint<string, {
1068
+ method: "POST";
1069
+ }, {
1070
+ success: boolean;
1071
+ error: unknown;
1072
+ }>;
1073
+ };
1074
+ schema: {
1075
+ apikey: {
1076
+ fields: {
1077
+ configId: {
1078
+ type: "string";
1079
+ required: true;
1080
+ defaultValue: string;
1081
+ input: false;
1082
+ index: true;
1083
+ };
1084
+ name: {
1085
+ type: "string";
1086
+ required: false;
1087
+ input: false;
1088
+ };
1089
+ start: {
1090
+ type: "string";
1091
+ required: false;
1092
+ input: false;
1093
+ };
1094
+ referenceId: {
1095
+ type: "string";
1096
+ required: true;
1097
+ input: false;
1098
+ index: true;
1099
+ };
1100
+ prefix: {
1101
+ type: "string";
1102
+ required: false;
1103
+ input: false;
1104
+ };
1105
+ key: {
1106
+ type: "string";
1107
+ required: true;
1108
+ input: false;
1109
+ index: true;
1110
+ };
1111
+ refillInterval: {
1112
+ type: "number";
1113
+ required: false;
1114
+ input: false;
1115
+ };
1116
+ refillAmount: {
1117
+ type: "number";
1118
+ required: false;
1119
+ input: false;
1120
+ };
1121
+ lastRefillAt: {
1122
+ type: "date";
1123
+ required: false;
1124
+ input: false;
1125
+ };
1126
+ enabled: {
1127
+ type: "boolean";
1128
+ required: false;
1129
+ input: false;
1130
+ defaultValue: true;
1131
+ };
1132
+ rateLimitEnabled: {
1133
+ type: "boolean";
1134
+ required: false;
1135
+ input: false;
1136
+ defaultValue: true;
1137
+ };
1138
+ rateLimitTimeWindow: {
1139
+ type: "number";
1140
+ required: false;
1141
+ input: false;
1142
+ defaultValue: number;
1143
+ };
1144
+ rateLimitMax: {
1145
+ type: "number";
1146
+ required: false;
1147
+ input: false;
1148
+ defaultValue: number;
1149
+ };
1150
+ requestCount: {
1151
+ type: "number";
1152
+ required: false;
1153
+ input: false;
1154
+ defaultValue: number;
1155
+ };
1156
+ remaining: {
1157
+ type: "number";
1158
+ required: false;
1159
+ input: false;
1160
+ };
1161
+ lastRequest: {
1162
+ type: "date";
1163
+ required: false;
1164
+ input: false;
1165
+ };
1166
+ expiresAt: {
1167
+ type: "date";
1168
+ required: false;
1169
+ input: false;
1170
+ };
1171
+ createdAt: {
1172
+ type: "date";
1173
+ required: true;
1174
+ input: false;
1175
+ };
1176
+ updatedAt: {
1177
+ type: "date";
1178
+ required: true;
1179
+ input: false;
1180
+ };
1181
+ permissions: {
1182
+ type: "string";
1183
+ required: false;
1184
+ input: false;
1185
+ };
1186
+ metadata: {
1187
+ type: "string";
1188
+ required: false;
1189
+ input: true;
1190
+ transform: {
1191
+ input(value: import("better-auth").DBPrimitive): string;
1192
+ output(value: import("better-auth").DBPrimitive): any;
1193
+ };
1194
+ };
1195
+ };
1196
+ };
1197
+ };
1198
+ }, {
1199
+ id: "device-authorization";
1200
+ version: string;
1201
+ schema: {
1202
+ deviceCode: {
1203
+ fields: {
1204
+ deviceCode: {
1205
+ type: "string";
1206
+ required: true;
1207
+ };
1208
+ userCode: {
1209
+ type: "string";
1210
+ required: true;
1211
+ };
1212
+ userId: {
1213
+ type: "string";
1214
+ required: false;
1215
+ };
1216
+ expiresAt: {
1217
+ type: "date";
1218
+ required: true;
1219
+ };
1220
+ status: {
1221
+ type: "string";
1222
+ required: true;
1223
+ };
1224
+ lastPolledAt: {
1225
+ type: "date";
1226
+ required: false;
1227
+ };
1228
+ pollingInterval: {
1229
+ type: "number";
1230
+ required: false;
1231
+ };
1232
+ clientId: {
1233
+ type: "string";
1234
+ required: false;
1235
+ };
1236
+ scope: {
1237
+ type: "string";
1238
+ required: false;
1239
+ };
1240
+ };
1241
+ indexes: {
1242
+ fields: [string];
1243
+ unique: true;
1244
+ }[];
1245
+ };
1246
+ };
1247
+ endpoints: {
1248
+ deviceCode: import("better-auth").StrictEndpoint<"/device/code", {
1249
+ method: "POST";
1250
+ cloneRequest: true;
1251
+ body: import("better-auth").ZodObject<{
1252
+ client_id: import("better-auth").ZodString;
1253
+ user_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1254
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1255
+ }, import("zod/v4/core").$strip> | import("better-auth").ZodObject<{
1256
+ user_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1257
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1258
+ client_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1259
+ }, import("zod/v4/core").$strip>;
1260
+ error: import("better-auth").ZodObject<{
1261
+ error: import("better-auth").ZodEnum<{
1262
+ invalid_client: "invalid_client";
1263
+ invalid_request: "invalid_request";
1264
+ invalid_scope: "invalid_scope";
1265
+ server_error: "server_error";
1266
+ unauthorized_client: "unauthorized_client";
1267
+ }>;
1268
+ error_description: import("better-auth").ZodString;
1269
+ }, import("zod/v4/core").$strip>;
1270
+ onValidationError: ({ issues, message }: {
1271
+ message: string;
1272
+ issues: readonly import("better-call").StandardSchemaV1.Issue[];
1273
+ }) => never;
1274
+ metadata: {
1275
+ noStore: boolean;
1276
+ allowedMediaTypes: string[];
1277
+ openapi: {
1278
+ description: string;
1279
+ responses: {
1280
+ 200: {
1281
+ description: string;
1282
+ content: {
1283
+ "application/json": {
1284
+ schema: {
1285
+ type: "object";
1286
+ properties: {
1287
+ device_code: {
1288
+ type: string;
1289
+ description: string;
1290
+ };
1291
+ user_code: {
1292
+ type: string;
1293
+ description: string;
1294
+ };
1295
+ verification_uri: {
1296
+ type: string;
1297
+ format: string;
1298
+ description: string;
1299
+ };
1300
+ verification_uri_complete: {
1301
+ type: string;
1302
+ format: string;
1303
+ description: string;
1304
+ };
1305
+ expires_in: {
1306
+ type: string;
1307
+ description: string;
1308
+ };
1309
+ interval: {
1310
+ type: string;
1311
+ description: string;
1312
+ };
1313
+ };
1314
+ };
1315
+ };
1316
+ };
1317
+ };
1318
+ 400: {
1319
+ description: string;
1320
+ content: {
1321
+ "application/json": {
1322
+ schema: {
1323
+ type: "object";
1324
+ properties: {
1325
+ error: {
1326
+ type: string;
1327
+ enum: ["invalid_request", "invalid_client", "unauthorized_client", "invalid_scope"];
1328
+ };
1329
+ error_description: {
1330
+ type: string;
1331
+ };
1332
+ };
1333
+ };
1334
+ };
1335
+ };
1336
+ };
1337
+ 500: {
1338
+ description: string;
1339
+ content: {
1340
+ "application/json": {
1341
+ schema: {
1342
+ type: "object";
1343
+ properties: {
1344
+ error: {
1345
+ type: string;
1346
+ enum: string[];
1347
+ };
1348
+ error_description: {
1349
+ type: string;
1350
+ };
1351
+ };
1352
+ };
1353
+ };
1354
+ };
1355
+ };
1356
+ };
1357
+ };
1358
+ };
1359
+ }, {
1360
+ device_code: string;
1361
+ user_code: string;
1362
+ verification_uri: string;
1363
+ verification_uri_complete: string;
1364
+ expires_in: number;
1365
+ interval: number;
1366
+ }>;
1367
+ deviceToken: import("better-auth").StrictEndpoint<"/device/token", {
1368
+ method: "POST";
1369
+ body: import("better-auth").ZodObject<{
1370
+ grant_type: import("better-auth").ZodLiteral<"urn:ietf:params:oauth:grant-type:device_code">;
1371
+ device_code: import("better-auth").ZodString;
1372
+ client_id: import("better-auth").ZodString;
1373
+ }, import("zod/v4/core").$strip>;
1374
+ error: import("better-auth").ZodObject<{
1375
+ error: import("better-auth").ZodEnum<{
1376
+ invalid_request: "invalid_request";
1377
+ authorization_pending: "authorization_pending";
1378
+ slow_down: "slow_down";
1379
+ expired_token: "expired_token";
1380
+ access_denied: "access_denied";
1381
+ invalid_grant: "invalid_grant";
1382
+ }>;
1383
+ error_description: import("better-auth").ZodString;
1384
+ }, import("zod/v4/core").$strip>;
1385
+ metadata: {
1386
+ noStore: boolean;
1387
+ openapi: {
1388
+ description: string;
1389
+ responses: {
1390
+ 200: {
1391
+ description: string;
1392
+ content: {
1393
+ "application/json": {
1394
+ schema: {
1395
+ type: "object";
1396
+ properties: {
1397
+ session: {
1398
+ $ref: string;
1399
+ };
1400
+ user: {
1401
+ $ref: string;
1402
+ };
1403
+ };
1404
+ };
1405
+ };
1406
+ };
1407
+ };
1408
+ 400: {
1409
+ description: string;
1410
+ content: {
1411
+ "application/json": {
1412
+ schema: {
1413
+ type: "object";
1414
+ properties: {
1415
+ error: {
1416
+ type: string;
1417
+ enum: string[];
1418
+ };
1419
+ error_description: {
1420
+ type: string;
1421
+ };
1422
+ };
1423
+ };
1424
+ };
1425
+ };
1426
+ };
1427
+ };
1428
+ };
1429
+ };
1430
+ }, {
1431
+ access_token: string;
1432
+ token_type: string;
1433
+ expires_in: number;
1434
+ scope: string;
1435
+ }>;
1436
+ deviceVerify: import("better-auth").StrictEndpoint<"/device", {
1437
+ method: "GET";
1438
+ query: import("better-auth").ZodObject<{
1439
+ user_code: import("better-auth").ZodString;
1440
+ }, import("zod/v4/core").$strip>;
1441
+ error: import("better-auth").ZodObject<{
1442
+ error: import("better-auth").ZodEnum<{
1443
+ invalid_request: "invalid_request";
1444
+ }>;
1445
+ error_description: import("better-auth").ZodString;
1446
+ }, import("zod/v4/core").$strip>;
1447
+ metadata: {
1448
+ openapi: {
1449
+ description: string;
1450
+ responses: {
1451
+ 200: {
1452
+ description: string;
1453
+ content: {
1454
+ "application/json": {
1455
+ schema: {
1456
+ type: "object";
1457
+ properties: {
1458
+ user_code: {
1459
+ type: string;
1460
+ description: string;
1461
+ };
1462
+ status: {
1463
+ type: string;
1464
+ enum: string[];
1465
+ description: string;
1466
+ };
1467
+ client_id: {
1468
+ type: string;
1469
+ description: string;
1470
+ };
1471
+ scope: {
1472
+ type: string;
1473
+ description: string;
1474
+ };
1475
+ };
1476
+ };
1477
+ };
1478
+ };
1479
+ };
1480
+ };
1481
+ };
1482
+ };
1483
+ }, {
1484
+ user_code: string;
1485
+ status: string;
1486
+ client_id?: string | undefined;
1487
+ scope?: string | undefined;
1488
+ } & Partial<Record<never, never>>>;
1489
+ deviceApprove: import("better-auth").StrictEndpoint<"/device/approve", {
1490
+ method: "POST";
1491
+ body: import("better-auth").ZodObject<{
1492
+ userCode: import("better-auth").ZodString;
1493
+ }, import("zod/v4/core").$strip>;
1494
+ error: import("better-auth").ZodObject<{
1495
+ error: import("better-auth").ZodEnum<{
1496
+ invalid_request: "invalid_request";
1497
+ expired_token: "expired_token";
1498
+ access_denied: "access_denied";
1499
+ device_code_already_processed: "device_code_already_processed";
1500
+ unauthorized: "unauthorized";
1501
+ }>;
1502
+ error_description: import("better-auth").ZodString;
1503
+ }, import("zod/v4/core").$strip>;
1504
+ requireHeaders: true;
1505
+ metadata: {
1506
+ openapi: {
1507
+ description: string;
1508
+ responses: {
1509
+ 200: {
1510
+ description: string;
1511
+ content: {
1512
+ "application/json": {
1513
+ schema: {
1514
+ type: "object";
1515
+ properties: {
1516
+ success: {
1517
+ type: string;
1518
+ };
1519
+ };
1520
+ };
1521
+ };
1522
+ };
1523
+ };
1524
+ };
1525
+ };
1526
+ };
1527
+ }, {
1528
+ success: boolean;
1529
+ }>;
1530
+ deviceDeny: import("better-auth").StrictEndpoint<"/device/deny", {
1531
+ method: "POST";
1532
+ body: import("better-auth").ZodObject<{
1533
+ userCode: import("better-auth").ZodString;
1534
+ }, import("zod/v4/core").$strip>;
1535
+ error: import("better-auth").ZodObject<{
1536
+ error: import("better-auth").ZodEnum<{
1537
+ invalid_request: "invalid_request";
1538
+ expired_token: "expired_token";
1539
+ access_denied: "access_denied";
1540
+ unauthorized: "unauthorized";
1541
+ }>;
1542
+ error_description: import("better-auth").ZodString;
1543
+ }, import("zod/v4/core").$strip>;
1544
+ requireHeaders: true;
1545
+ metadata: {
1546
+ openapi: {
1547
+ description: string;
1548
+ responses: {
1549
+ 200: {
1550
+ description: string;
1551
+ content: {
1552
+ "application/json": {
1553
+ schema: {
1554
+ type: "object";
1555
+ properties: {
1556
+ success: {
1557
+ type: string;
1558
+ };
1559
+ };
1560
+ };
1561
+ };
1562
+ };
1563
+ };
1564
+ };
1565
+ };
1566
+ };
1567
+ }, {
1568
+ success: boolean;
1569
+ }>;
1570
+ };
1571
+ rateLimit: {
1572
+ pathMatcher(path: string): path is "/device";
1573
+ window: number;
1574
+ max: number;
1575
+ }[];
1576
+ $ERROR_CODES: {
1577
+ USER_NOT_FOUND: import("better-auth").RawError<"USER_NOT_FOUND">;
1578
+ FAILED_TO_CREATE_SESSION: import("better-auth").RawError<"FAILED_TO_CREATE_SESSION">;
1579
+ INVALID_DEVICE_CODE: import("better-auth").RawError<"INVALID_DEVICE_CODE">;
1580
+ EXPIRED_DEVICE_CODE: import("better-auth").RawError<"EXPIRED_DEVICE_CODE">;
1581
+ EXPIRED_USER_CODE: import("better-auth").RawError<"EXPIRED_USER_CODE">;
1582
+ AUTHORIZATION_PENDING: import("better-auth").RawError<"AUTHORIZATION_PENDING">;
1583
+ ACCESS_DENIED: import("better-auth").RawError<"ACCESS_DENIED">;
1584
+ INVALID_USER_CODE: import("better-auth").RawError<"INVALID_USER_CODE">;
1585
+ DEVICE_CODE_ALREADY_PROCESSED: import("better-auth").RawError<"DEVICE_CODE_ALREADY_PROCESSED">;
1586
+ DEVICE_CODE_NOT_CLAIMED: import("better-auth").RawError<"DEVICE_CODE_NOT_CLAIMED">;
1587
+ POLLING_TOO_FREQUENTLY: import("better-auth").RawError<"POLLING_TOO_FREQUENTLY">;
1588
+ INVALID_DEVICE_CODE_STATUS: import("better-auth").RawError<"INVALID_DEVICE_CODE_STATUS">;
1589
+ AUTHENTICATION_REQUIRED: import("better-auth").RawError<"AUTHENTICATION_REQUIRED">;
1590
+ };
1591
+ options: {
1592
+ grant: import("better-auth/plugins").DeviceAuthorizationGrant<Readonly<{
1593
+ [k: string]: import("zod/v4/core").$ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
1594
+ }>, Record<string, unknown>> | undefined;
1595
+ expiresIn: import("better-auth/plugins").TimeString;
1596
+ interval: import("better-auth/plugins").TimeString;
1597
+ deviceCodeLength: number;
1598
+ userCodeLength: number;
1599
+ generateDeviceCode?: (() => string | Promise<string>) | undefined;
1600
+ generateUserCode?: (() => string | Promise<string>) | undefined;
1601
+ validateClient?: ((clientId: string) => boolean | Promise<boolean>) | undefined;
1602
+ onDeviceAuthRequest?: ((clientId: string, scope: string | undefined) => void | Promise<void>) | undefined;
1603
+ verificationUri?: string | undefined;
1604
+ schema?: {
1605
+ deviceCode?: {
1606
+ modelName?: string | undefined;
1607
+ fields?: {
1608
+ deviceCode?: string | undefined;
1609
+ userCode?: string | undefined;
1610
+ userId?: string | undefined;
1611
+ expiresAt?: string | undefined;
1612
+ status?: string | undefined;
1613
+ lastPolledAt?: string | undefined;
1614
+ pollingInterval?: string | undefined;
1615
+ clientId?: string | undefined;
1616
+ scope?: string | undefined;
1617
+ } | undefined;
1618
+ } | undefined;
1619
+ } | undefined;
1620
+ };
1621
+ }, ...({
1622
+ id: "jwt";
1623
+ version: string;
1624
+ options: NoInfer<{
1625
+ schema: {
1626
+ jwks: {
1627
+ modelName: string;
1628
+ };
1629
+ };
1630
+ }>;
1631
+ init(ctx: import("better-auth").AuthContext): {
1632
+ context: {
1633
+ sessionConfig: {
1634
+ cookieCacheSigner: import("better-auth").CookieCacheSigner;
1635
+ updateAge: number;
1636
+ expiresIn: number;
1637
+ freshAge: number;
1638
+ cookieRefreshCache: false | {
1639
+ enabled: true;
1640
+ updateAge: number;
1641
+ };
1642
+ };
1643
+ };
1644
+ } | undefined;
1645
+ endpoints: {
1646
+ getJwks: import("better-auth").StrictEndpoint<string, {
1647
+ method: "GET";
1648
+ metadata: {
1649
+ openapi: {
1650
+ operationId: string;
1651
+ description: string;
1652
+ responses: {
1653
+ "200": {
1654
+ description: string;
1655
+ content: {
1656
+ "application/json": {
1657
+ schema: {
1658
+ type: "object";
1659
+ properties: {
1660
+ keys: {
1661
+ type: string;
1662
+ description: string;
1663
+ items: {
1664
+ type: string;
1665
+ properties: {
1666
+ kid: {
1667
+ type: string;
1668
+ description: string;
1669
+ };
1670
+ kty: {
1671
+ type: string;
1672
+ description: string;
1673
+ };
1674
+ alg: {
1675
+ type: string;
1676
+ description: string;
1677
+ };
1678
+ use: {
1679
+ type: string;
1680
+ description: string;
1681
+ enum: string[];
1682
+ nullable: boolean;
1683
+ };
1684
+ n: {
1685
+ type: string;
1686
+ description: string;
1687
+ nullable: boolean;
1688
+ };
1689
+ e: {
1690
+ type: string;
1691
+ description: string;
1692
+ nullable: boolean;
1693
+ };
1694
+ crv: {
1695
+ type: string;
1696
+ description: string;
1697
+ nullable: boolean;
1698
+ };
1699
+ x: {
1700
+ type: string;
1701
+ description: string;
1702
+ nullable: boolean;
1703
+ };
1704
+ y: {
1705
+ type: string;
1706
+ description: string;
1707
+ nullable: boolean;
1708
+ };
1709
+ };
1710
+ required: string[];
1711
+ };
1712
+ };
1713
+ };
1714
+ required: string[];
1715
+ };
1716
+ };
1717
+ };
1718
+ };
1719
+ };
1720
+ };
1721
+ };
1722
+ }, import("better-auth").JSONWebKeySet>;
1723
+ getToken: import("better-auth").StrictEndpoint<"/token", {
1724
+ method: "GET";
1725
+ requireHeaders: true;
1726
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1727
+ session: {
1728
+ session: Record<string, any> & {
1729
+ id: string;
1730
+ createdAt: Date;
1731
+ updatedAt: Date;
1732
+ userId: string;
1733
+ expiresAt: Date;
1734
+ token: string;
1735
+ ipAddress?: string | null | undefined;
1736
+ userAgent?: string | null | undefined;
1737
+ };
1738
+ user: Record<string, any> & {
1739
+ id: string;
1740
+ createdAt: Date;
1741
+ updatedAt: Date;
1742
+ email: string;
1743
+ emailVerified: boolean;
1744
+ name: string;
1745
+ image?: string | null | undefined;
1746
+ };
1747
+ };
1748
+ }>>[];
1749
+ metadata: {
1750
+ openapi: {
1751
+ operationId: string;
1752
+ description: string;
1753
+ responses: {
1754
+ 200: {
1755
+ description: string;
1756
+ content: {
1757
+ "application/json": {
1758
+ schema: {
1759
+ type: "object";
1760
+ properties: {
1761
+ token: {
1762
+ type: string;
1763
+ };
1764
+ };
1765
+ };
1766
+ };
1767
+ };
1768
+ };
1769
+ };
1770
+ };
1771
+ };
1772
+ }, {
1773
+ token: string;
1774
+ }>;
1775
+ signJWT: import("better-auth").StrictEndpoint<string, {
1776
+ method: "POST";
1777
+ metadata: {
1778
+ $Infer: {
1779
+ body: {
1780
+ payload: import("better-auth").JWTPayload;
1781
+ overrideOptions?: import("better-auth/plugins").JwtOptions | undefined;
1782
+ };
1783
+ };
1784
+ };
1785
+ body: import("better-auth").ZodObject<{
1786
+ payload: import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>;
1787
+ overrideOptions: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodAny>>;
1788
+ }, import("zod/v4/core").$strip>;
1789
+ }, {
1790
+ token: string;
1791
+ }>;
1792
+ verifyJWT: import("better-auth").StrictEndpoint<string, {
1793
+ method: "POST";
1794
+ metadata: {
1795
+ $Infer: {
1796
+ body: {
1797
+ token: string;
1798
+ issuer?: string;
1799
+ };
1800
+ response: {
1801
+ payload: {
1802
+ sub: string;
1803
+ aud: string;
1804
+ [key: string]: any;
1805
+ } | null;
1806
+ };
1807
+ };
1808
+ };
1809
+ body: import("better-auth").ZodObject<{
1810
+ token: import("better-auth").ZodString;
1811
+ issuer: import("better-auth").ZodOptional<import("better-auth").ZodString>;
1812
+ }, import("zod/v4/core").$strip>;
1813
+ }, {
1814
+ payload: (import("better-auth").JWTPayload & Required<Pick<import("better-auth").JWTPayload, "sub" | "aud">>) | null;
1815
+ }>;
1816
+ };
1817
+ hooks: {
1818
+ after: {
1819
+ matcher(context: import("better-auth").HookEndpointContext): boolean;
1820
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>;
1821
+ }[];
1822
+ };
1823
+ schema: {
1824
+ jwks: {
1825
+ fields: {
1826
+ publicKey: {
1827
+ type: "string";
1828
+ required: true;
1829
+ };
1830
+ privateKey: {
1831
+ type: "string";
1832
+ required: true;
1833
+ };
1834
+ createdAt: {
1835
+ type: "date";
1836
+ required: true;
1837
+ };
1838
+ expiresAt: {
1839
+ type: "date";
1840
+ required: false;
1841
+ };
1842
+ alg: {
1843
+ type: "string";
1844
+ required: false;
1845
+ };
1846
+ crv: {
1847
+ type: "string";
1848
+ required: false;
1849
+ };
1850
+ };
1851
+ };
1852
+ };
1853
+ } | {
1854
+ id: "oauth-provider";
1855
+ version: string;
1856
+ options: NoInfer<{
1857
+ loginPage: string;
1858
+ consentPage: string;
1859
+ allowDynamicClientRegistration: true;
1860
+ allowUnauthenticatedClientRegistration: true;
1861
+ clientRegistrationDefaultApplicationType: "infer";
1862
+ scopes: ("email" | "offline_access" | "openid" | "profile")[];
1863
+ clientRegistrationAllowedScopes: ("email" | "offline_access" | "openid" | "profile")[];
1864
+ resources?: string[];
1865
+ clientRegistrationDefaultResources?: string[];
1866
+ schema: {
1867
+ oauthClient: {
1868
+ modelName: string;
1869
+ };
1870
+ oauthRefreshToken: {
1871
+ modelName: string;
1872
+ };
1873
+ oauthAccessToken: {
1874
+ modelName: string;
1875
+ };
1876
+ oauthConsent: {
1877
+ modelName: string;
1878
+ };
1879
+ oauthResource: {
1880
+ modelName: string;
1881
+ };
1882
+ oauthClientResource: {
1883
+ modelName: string;
1884
+ };
1885
+ oauthClientAssertion: {
1886
+ modelName: string;
1887
+ };
1888
+ };
1889
+ }>;
1890
+ onRequest: (request: Request, ctx: import("better-auth").AuthContext) => Promise<{
1891
+ response: Response;
1892
+ } | {
1893
+ request: Request;
1894
+ } | void>;
1895
+ init: (ctx: import("better-auth").AuthContext) => Promise<{
1896
+ options: {
1897
+ databaseHooks: {
1898
+ session: {
1899
+ delete: {
1900
+ before(session: {
1901
+ id: string;
1902
+ createdAt: Date;
1903
+ updatedAt: Date;
1904
+ userId: string;
1905
+ expiresAt: Date;
1906
+ token: string;
1907
+ ipAddress?: string | null | undefined;
1908
+ userAgent?: string | null | undefined;
1909
+ } & Record<string, unknown>, hookCtx: import("better-auth").GenericEndpointContext | null): Promise<void>;
1910
+ after(session: {
1911
+ id: string;
1912
+ createdAt: Date;
1913
+ updatedAt: Date;
1914
+ userId: string;
1915
+ expiresAt: Date;
1916
+ token: string;
1917
+ ipAddress?: string | null | undefined;
1918
+ userAgent?: string | null | undefined;
1919
+ } & Record<string, unknown>, hookCtx: import("better-auth").GenericEndpointContext | null): Promise<void>;
1920
+ };
1921
+ };
1922
+ };
1923
+ };
1924
+ }>;
1925
+ hooks: {
1926
+ before: {
1927
+ matcher(ctx: import("better-auth").HookEndpointContext): any;
1928
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>;
1929
+ }[];
1930
+ after: {
1931
+ matcher(ctx: import("better-auth").HookEndpointContext): boolean;
1932
+ handler: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
1933
+ redirect: true;
1934
+ url: string;
1935
+ } | undefined>>;
1936
+ }[];
1937
+ };
1938
+ endpoints: {
1939
+ getOAuthServerConfig: import("better-auth").StrictEndpoint<"/.well-known/oauth-authorization-server", {
1940
+ method: "GET";
1941
+ metadata: {
1942
+ SERVER_ONLY: true;
1943
+ };
1944
+ }, import("@better-auth/oauth-provider").AuthServerMetadata>;
1945
+ getOpenIdConfig: import("better-auth").StrictEndpoint<"/.well-known/openid-configuration", {
1946
+ method: "GET";
1947
+ metadata: {
1948
+ SERVER_ONLY: true;
1949
+ };
1950
+ }, {
1951
+ jwks_uri?: string | undefined;
1952
+ userinfo_endpoint: string;
1953
+ acr_values_supported?: string[] | undefined;
1954
+ subject_types_supported: ("public" | "pairwise")[];
1955
+ claims_supported: string[];
1956
+ claims_parameter_supported?: boolean | undefined;
1957
+ end_session_endpoint: string;
1958
+ request_parameter_supported?: boolean | undefined;
1959
+ request_uri_parameter_supported?: boolean | undefined;
1960
+ prompt_values_supported: import("@better-auth/oauth-provider").Prompt[];
1961
+ issuer: string;
1962
+ authorization_endpoint: string;
1963
+ token_endpoint: string;
1964
+ registration_endpoint?: string | undefined;
1965
+ scopes_supported?: string[] | undefined;
1966
+ response_types_supported: "code"[];
1967
+ response_modes_supported: "query"[];
1968
+ grant_types_supported: import("@better-auth/oauth-provider").GrantType[];
1969
+ token_endpoint_auth_methods_supported?: import("@better-auth/oauth-provider").TokenEndpointAuthMethod[] | undefined;
1970
+ token_endpoint_auth_signing_alg_values_supported?: import("better-auth").PrivateKeyJwtSigningAlgorithm[] | undefined;
1971
+ service_documentation?: string | undefined;
1972
+ ui_locales_supported?: string[] | undefined;
1973
+ op_policy_uri?: string | undefined;
1974
+ op_tos_uri?: string | undefined;
1975
+ revocation_endpoint?: string | undefined;
1976
+ revocation_endpoint_auth_methods_supported?: import("@better-auth/oauth-provider").TokenEndpointAuthMethod[] | undefined;
1977
+ revocation_endpoint_auth_signing_alg_values_supported?: import("better-auth").PrivateKeyJwtSigningAlgorithm[] | undefined;
1978
+ introspection_endpoint?: string | undefined;
1979
+ introspection_endpoint_auth_methods_supported?: import("@better-auth/oauth-provider").TokenEndpointAuthMethod[] | undefined;
1980
+ introspection_endpoint_auth_signing_alg_values_supported?: import("better-auth").PrivateKeyJwtSigningAlgorithm[] | undefined;
1981
+ code_challenge_methods_supported: "S256"[];
1982
+ authorization_response_iss_parameter_supported?: boolean | undefined;
1983
+ client_id_metadata_document_supported?: boolean | undefined;
1984
+ backchannel_logout_supported?: boolean | undefined;
1985
+ backchannel_logout_session_supported?: boolean | undefined;
1986
+ dpop_signing_alg_values_supported?: import("better-auth/plugins").JWSAlgorithms[] | undefined;
1987
+ id_token_signing_alg_values_supported: import("better-auth/plugins").JWSAlgorithms[] | ["HS256"];
1988
+ }>;
1989
+ oauth2Authorize: import("better-auth").StrictEndpoint<"/oauth2/authorize", {
1990
+ method: ("GET" | "POST")[];
1991
+ body: import("better-auth").ZodObject<{}, import("zod/v4/core").$loose>;
1992
+ redirectOnError: import("@better-auth/oauth-provider").OAuthRedirectOnError<import("better-auth").GenericEndpointContext, {
1993
+ redirect: true;
1994
+ url: string;
1995
+ }>;
1996
+ metadata: {
1997
+ allowedMediaTypes: string[];
1998
+ openapi: {
1999
+ description: string;
2000
+ parameters: ({
2001
+ name: string;
2002
+ in: "query";
2003
+ required: false;
2004
+ schema: {
2005
+ type: "string";
2006
+ format?: undefined;
2007
+ minimum?: undefined;
2008
+ items?: undefined;
2009
+ };
2010
+ description: string;
2011
+ } | {
2012
+ name: string;
2013
+ in: "query";
2014
+ required: true;
2015
+ schema: {
2016
+ type: "string";
2017
+ format?: undefined;
2018
+ minimum?: undefined;
2019
+ items?: undefined;
2020
+ };
2021
+ description: string;
2022
+ } | {
2023
+ name: string;
2024
+ in: "query";
2025
+ required: false;
2026
+ schema: {
2027
+ type: "string";
2028
+ format: string;
2029
+ minimum?: undefined;
2030
+ items?: undefined;
2031
+ };
2032
+ description: string;
2033
+ } | {
2034
+ name: string;
2035
+ in: "query";
2036
+ required: false;
2037
+ schema: {
2038
+ type: "integer";
2039
+ minimum: number;
2040
+ format?: undefined;
2041
+ items?: undefined;
2042
+ };
2043
+ description: string;
2044
+ } | {
2045
+ name: string;
2046
+ in: "query";
2047
+ required: false;
2048
+ schema: {
2049
+ type: "array";
2050
+ items: {
2051
+ type: "string";
2052
+ };
2053
+ format?: undefined;
2054
+ minimum?: undefined;
2055
+ };
2056
+ description: string;
2057
+ })[];
2058
+ responses: {
2059
+ "302": {
2060
+ description: string;
2061
+ headers: {
2062
+ Location: {
2063
+ description: string;
2064
+ schema: {
2065
+ type: string;
2066
+ format: string;
2067
+ };
2068
+ };
2069
+ };
2070
+ };
2071
+ "400": {
2072
+ description: string;
2073
+ content: {
2074
+ "application/json": {
2075
+ schema: {
2076
+ type: "object";
2077
+ properties: {
2078
+ error: {
2079
+ type: string;
2080
+ };
2081
+ error_description: {
2082
+ type: string;
2083
+ };
2084
+ state: {
2085
+ type: string;
2086
+ };
2087
+ };
2088
+ required: string[];
2089
+ };
2090
+ };
2091
+ };
2092
+ };
2093
+ };
2094
+ };
2095
+ };
2096
+ }, {
2097
+ redirect: true;
2098
+ url: string;
2099
+ }>;
2100
+ oauth2Consent: import("better-auth").StrictEndpoint<"/oauth2/consent", {
2101
+ method: "POST";
2102
+ body: import("better-auth").ZodObject<{
2103
+ accept: import("better-auth").ZodBoolean;
2104
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2105
+ claims: import("better-auth").ZodOptional<import("better-auth").ZodUnion<readonly [import("better-auth").ZodString, import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>]>>;
2106
+ oauth_query: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2107
+ }, import("zod/v4/core").$strip>;
2108
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2109
+ session: {
2110
+ session: Record<string, any> & {
2111
+ id: string;
2112
+ createdAt: Date;
2113
+ updatedAt: Date;
2114
+ userId: string;
2115
+ expiresAt: Date;
2116
+ token: string;
2117
+ ipAddress?: string | null | undefined;
2118
+ userAgent?: string | null | undefined;
2119
+ };
2120
+ user: Record<string, any> & {
2121
+ id: string;
2122
+ createdAt: Date;
2123
+ updatedAt: Date;
2124
+ email: string;
2125
+ emailVerified: boolean;
2126
+ name: string;
2127
+ image?: string | null | undefined;
2128
+ };
2129
+ };
2130
+ }>>[];
2131
+ metadata: {
2132
+ openapi: {
2133
+ description: string;
2134
+ responses: {
2135
+ "200": {
2136
+ description: string;
2137
+ content: {
2138
+ "application/json": {
2139
+ schema: {
2140
+ type: "object";
2141
+ properties: {
2142
+ redirect: {
2143
+ type: string;
2144
+ description: string;
2145
+ enum: boolean[];
2146
+ };
2147
+ url: {
2148
+ type: string;
2149
+ format: string;
2150
+ description: string;
2151
+ };
2152
+ };
2153
+ required: string[];
2154
+ };
2155
+ };
2156
+ };
2157
+ };
2158
+ };
2159
+ };
2160
+ };
2161
+ }, {
2162
+ redirect: true;
2163
+ url: string;
2164
+ } | {
2165
+ redirect: boolean;
2166
+ url: string;
2167
+ }>;
2168
+ oauth2Continue: import("better-auth").StrictEndpoint<"/oauth2/continue", {
2169
+ method: "POST";
2170
+ body: import("better-auth").ZodObject<{
2171
+ selected: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2172
+ created: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2173
+ postLogin: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2174
+ oauth_query: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2175
+ }, import("zod/v4/core").$strip>;
2176
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
2177
+ session: {
2178
+ session: Record<string, any> & {
2179
+ id: string;
2180
+ createdAt: Date;
2181
+ updatedAt: Date;
2182
+ userId: string;
2183
+ expiresAt: Date;
2184
+ token: string;
2185
+ ipAddress?: string | null | undefined;
2186
+ userAgent?: string | null | undefined;
2187
+ };
2188
+ user: Record<string, any> & {
2189
+ id: string;
2190
+ createdAt: Date;
2191
+ updatedAt: Date;
2192
+ email: string;
2193
+ emailVerified: boolean;
2194
+ name: string;
2195
+ image?: string | null | undefined;
2196
+ };
2197
+ };
2198
+ }>>[];
2199
+ metadata: {
2200
+ openapi: {
2201
+ description: string;
2202
+ responses: {
2203
+ "200": {
2204
+ description: string;
2205
+ content: {
2206
+ "application/json": {
2207
+ schema: {
2208
+ type: "object";
2209
+ properties: {
2210
+ redirect: {
2211
+ type: string;
2212
+ description: string;
2213
+ enum: boolean[];
2214
+ };
2215
+ url: {
2216
+ type: string;
2217
+ format: string;
2218
+ description: string;
2219
+ };
2220
+ };
2221
+ required: string[];
2222
+ };
2223
+ };
2224
+ };
2225
+ };
2226
+ };
2227
+ };
2228
+ };
2229
+ }, {
2230
+ redirect: true;
2231
+ url: string;
2232
+ }>;
2233
+ oauth2Token: import("better-auth").StrictEndpoint<"/oauth2/token", {
2234
+ method: "POST";
2235
+ cloneRequest: true;
2236
+ body: import("better-auth").ZodObject<{
2237
+ grant_type: import("better-auth").ZodString;
2238
+ client_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2239
+ client_secret: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2240
+ client_assertion: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2241
+ client_assertion_type: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2242
+ code: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2243
+ code_verifier: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2244
+ redirect_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
2245
+ refresh_token: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2246
+ resource: import("better-auth").ZodOptional<import("better-auth").ZodUnion<readonly [import("better-auth").ZodString, import("better-auth").ZodArray<import("better-auth").ZodString>]>>;
2247
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2248
+ }, import("zod/v4/core").$loose>;
2249
+ errorCodesByField: {
2250
+ grant_type: {
2251
+ missing: "invalid_request";
2252
+ invalid: "unsupported_grant_type";
2253
+ };
2254
+ resource: {
2255
+ invalid: "invalid_target";
2256
+ };
2257
+ };
2258
+ metadata: {
2259
+ noStore: boolean;
2260
+ allowedMediaTypes: string[];
2261
+ openapi: {
2262
+ description: string;
2263
+ parameters: {
2264
+ name: string;
2265
+ in: "header";
2266
+ required: false;
2267
+ schema: {
2268
+ type: "string";
2269
+ };
2270
+ description: string;
2271
+ }[];
2272
+ requestBody: {
2273
+ required: boolean;
2274
+ content: {
2275
+ "application/json": {
2276
+ schema: {
2277
+ type: "object";
2278
+ properties: {
2279
+ grant_type: {
2280
+ type: string;
2281
+ description: string;
2282
+ };
2283
+ client_id: {
2284
+ type: string;
2285
+ description: string;
2286
+ };
2287
+ client_secret: {
2288
+ type: string;
2289
+ description: string;
2290
+ };
2291
+ code: {
2292
+ type: string;
2293
+ description: string;
2294
+ };
2295
+ code_verifier: {
2296
+ type: string;
2297
+ description: string;
2298
+ };
2299
+ redirect_uri: {
2300
+ type: string;
2301
+ format: string;
2302
+ description: string;
2303
+ };
2304
+ refresh_token: {
2305
+ type: string;
2306
+ description: string;
2307
+ };
2308
+ resource: {
2309
+ oneOf: ({
2310
+ type: string;
2311
+ description: string;
2312
+ items?: undefined;
2313
+ } | {
2314
+ type: string;
2315
+ items: {
2316
+ type: string;
2317
+ };
2318
+ description: string;
2319
+ })[];
2320
+ description: string;
2321
+ };
2322
+ scope: {
2323
+ type: string;
2324
+ description: string;
2325
+ };
2326
+ };
2327
+ required: string[];
2328
+ };
2329
+ };
2330
+ };
2331
+ };
2332
+ responses: {
2333
+ "200": {
2334
+ description: string;
2335
+ content: {
2336
+ "application/json": {
2337
+ schema: {
2338
+ type: "object";
2339
+ properties: {
2340
+ access_token: {
2341
+ type: string;
2342
+ description: string;
2343
+ };
2344
+ token_type: {
2345
+ type: string;
2346
+ description: string;
2347
+ enum: string[];
2348
+ };
2349
+ expires_in: {
2350
+ type: string;
2351
+ description: string;
2352
+ };
2353
+ refresh_token: {
2354
+ type: string;
2355
+ description: string;
2356
+ };
2357
+ scope: {
2358
+ type: string;
2359
+ description: string;
2360
+ };
2361
+ id_token: {
2362
+ type: string;
2363
+ description: string;
2364
+ };
2365
+ };
2366
+ required: string[];
2367
+ };
2368
+ };
2369
+ };
2370
+ };
2371
+ "400": {
2372
+ description: string;
2373
+ content: {
2374
+ "application/json": {
2375
+ schema: {
2376
+ type: "object";
2377
+ properties: {
2378
+ error: {
2379
+ type: string;
2380
+ };
2381
+ error_description: {
2382
+ type: string;
2383
+ };
2384
+ error_uri: {
2385
+ type: string;
2386
+ };
2387
+ };
2388
+ required: string[];
2389
+ };
2390
+ };
2391
+ };
2392
+ };
2393
+ };
2394
+ };
2395
+ };
2396
+ }, {
2397
+ expires_in: number;
2398
+ access_token: string;
2399
+ expires_at: number;
2400
+ token_type: import("@better-auth/oauth-provider").TokenType;
2401
+ refresh_token: string | undefined;
2402
+ scope: string;
2403
+ id_token: string | undefined;
2404
+ }>;
2405
+ oauth2Introspect: import("better-auth").StrictEndpoint<"/oauth2/introspect", {
2406
+ method: "POST";
2407
+ cloneRequest: true;
2408
+ body: import("better-auth").ZodObject<{
2409
+ client_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2410
+ client_secret: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2411
+ client_assertion: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2412
+ client_assertion_type: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2413
+ token: import("better-auth").ZodString;
2414
+ token_type_hint: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2415
+ }, import("zod/v4/core").$strip>;
2416
+ metadata: {
2417
+ noStore: boolean;
2418
+ allowedMediaTypes: string[];
2419
+ openapi: {
2420
+ description: string;
2421
+ requestBody: {
2422
+ required: boolean;
2423
+ content: {
2424
+ "application/json": {
2425
+ schema: {
2426
+ type: "object";
2427
+ properties: {
2428
+ client_id: {
2429
+ type: string;
2430
+ description: string;
2431
+ };
2432
+ client_secret: {
2433
+ type: string;
2434
+ description: string;
2435
+ };
2436
+ token: {
2437
+ type: string;
2438
+ description: string;
2439
+ };
2440
+ token_type_hint: {
2441
+ type: string;
2442
+ description: string;
2443
+ };
2444
+ };
2445
+ required: string[];
2446
+ };
2447
+ };
2448
+ };
2449
+ };
2450
+ responses: {
2451
+ "200": {
2452
+ description: string;
2453
+ content: {
2454
+ "application/json": {
2455
+ schema: {
2456
+ type: "object";
2457
+ properties: {
2458
+ active: {
2459
+ type: string;
2460
+ description: string;
2461
+ };
2462
+ scope: {
2463
+ type: string;
2464
+ description: string;
2465
+ };
2466
+ client_id: {
2467
+ type: string;
2468
+ description: string;
2469
+ };
2470
+ username: {
2471
+ type: string;
2472
+ description: string;
2473
+ };
2474
+ token_type: {
2475
+ type: string;
2476
+ description: string;
2477
+ };
2478
+ exp: {
2479
+ type: string;
2480
+ description: string;
2481
+ };
2482
+ iat: {
2483
+ type: string;
2484
+ description: string;
2485
+ };
2486
+ nbf: {
2487
+ type: string;
2488
+ description: string;
2489
+ };
2490
+ sub: {
2491
+ type: string;
2492
+ description: string;
2493
+ };
2494
+ aud: {
2495
+ type: string;
2496
+ description: string;
2497
+ };
2498
+ iss: {
2499
+ type: string;
2500
+ description: string;
2501
+ };
2502
+ jti: {
2503
+ type: string;
2504
+ description: string;
2505
+ };
2506
+ };
2507
+ required: string[];
2508
+ };
2509
+ };
2510
+ };
2511
+ };
2512
+ "400": {
2513
+ description: string;
2514
+ content: {
2515
+ "application/json": {
2516
+ schema: {
2517
+ type: "object";
2518
+ properties: {
2519
+ error: {
2520
+ type: string;
2521
+ };
2522
+ error_description: {
2523
+ type: string;
2524
+ };
2525
+ error_uri: {
2526
+ type: string;
2527
+ };
2528
+ };
2529
+ required: string[];
2530
+ };
2531
+ };
2532
+ };
2533
+ };
2534
+ };
2535
+ };
2536
+ };
2537
+ }, import("better-auth").JWTPayload>;
2538
+ oauth2Revoke: import("better-auth").StrictEndpoint<"/oauth2/revoke", {
2539
+ method: "POST";
2540
+ cloneRequest: true;
2541
+ body: import("better-auth").ZodObject<{
2542
+ client_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2543
+ client_secret: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2544
+ client_assertion: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2545
+ client_assertion_type: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2546
+ token: import("better-auth").ZodString;
2547
+ token_type_hint: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2548
+ }, import("zod/v4/core").$strip>;
2549
+ metadata: {
2550
+ allowedMediaTypes: string[];
2551
+ openapi: {
2552
+ description: string;
2553
+ requestBody: {
2554
+ required: boolean;
2555
+ content: {
2556
+ "application/json": {
2557
+ schema: {
2558
+ type: "object";
2559
+ properties: {
2560
+ client_id: {
2561
+ type: string;
2562
+ description: string;
2563
+ };
2564
+ client_secret: {
2565
+ type: string;
2566
+ description: string;
2567
+ };
2568
+ token: {
2569
+ type: string;
2570
+ description: string;
2571
+ };
2572
+ token_type_hint: {
2573
+ type: string;
2574
+ description: string;
2575
+ };
2576
+ };
2577
+ required: string[];
2578
+ };
2579
+ };
2580
+ };
2581
+ };
2582
+ responses: {
2583
+ "200": {
2584
+ description: string;
2585
+ content: {
2586
+ "application/json": {
2587
+ schema: {
2588
+ type: "object";
2589
+ description: string;
2590
+ };
2591
+ };
2592
+ };
2593
+ };
2594
+ "400": {
2595
+ description: string;
2596
+ content: {
2597
+ "application/json": {
2598
+ schema: {
2599
+ type: "object";
2600
+ properties: {
2601
+ error: {
2602
+ type: string;
2603
+ };
2604
+ error_description: {
2605
+ type: string;
2606
+ };
2607
+ error_uri: {
2608
+ type: string;
2609
+ };
2610
+ };
2611
+ required: string[];
2612
+ };
2613
+ };
2614
+ };
2615
+ };
2616
+ };
2617
+ };
2618
+ };
2619
+ }, null | undefined>;
2620
+ oauth2UserInfo: import("better-auth").StrictEndpoint<"/oauth2/userinfo", {
2621
+ method: ("GET" | "POST")[];
2622
+ body: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
2623
+ access_token: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2624
+ }, import("zod/v4/core").$loose>>;
2625
+ metadata: {
2626
+ noStore: boolean;
2627
+ allowedMediaTypes: string[];
2628
+ openapi: {
2629
+ description: string;
2630
+ security: ({
2631
+ bearerAuth: never[];
2632
+ OAuth2?: undefined;
2633
+ } | {
2634
+ OAuth2: string[];
2635
+ bearerAuth?: undefined;
2636
+ })[];
2637
+ parameters: {
2638
+ name: string;
2639
+ in: "header";
2640
+ required: false;
2641
+ schema: {
2642
+ type: "string";
2643
+ };
2644
+ description: string;
2645
+ }[];
2646
+ responses: {
2647
+ "200": {
2648
+ description: string;
2649
+ content: {
2650
+ "application/json": {
2651
+ schema: {
2652
+ type: "object";
2653
+ properties: {
2654
+ sub: {
2655
+ type: string;
2656
+ description: string;
2657
+ };
2658
+ email: {
2659
+ type: string;
2660
+ format: string;
2661
+ nullable: boolean;
2662
+ description: string;
2663
+ };
2664
+ name: {
2665
+ type: string;
2666
+ nullable: boolean;
2667
+ description: string;
2668
+ };
2669
+ picture: {
2670
+ type: string;
2671
+ format: string;
2672
+ nullable: boolean;
2673
+ description: string;
2674
+ };
2675
+ given_name: {
2676
+ type: string;
2677
+ nullable: boolean;
2678
+ description: string;
2679
+ };
2680
+ family_name: {
2681
+ type: string;
2682
+ nullable: boolean;
2683
+ description: string;
2684
+ };
2685
+ email_verified: {
2686
+ type: string;
2687
+ nullable: boolean;
2688
+ description: string;
2689
+ };
2690
+ };
2691
+ required: string[];
2692
+ };
2693
+ };
2694
+ };
2695
+ };
2696
+ "401": {
2697
+ description: string;
2698
+ content: {
2699
+ "application/json": {
2700
+ schema: {
2701
+ type: "object";
2702
+ properties: {
2703
+ error: {
2704
+ type: string;
2705
+ };
2706
+ error_description: {
2707
+ type: string;
2708
+ };
2709
+ };
2710
+ required: string[];
2711
+ };
2712
+ };
2713
+ };
2714
+ };
2715
+ "403": {
2716
+ description: string;
2717
+ content: {
2718
+ "application/json": {
2719
+ schema: {
2720
+ type: "object";
2721
+ properties: {
2722
+ error: {
2723
+ type: string;
2724
+ };
2725
+ error_description: {
2726
+ type: string;
2727
+ };
2728
+ };
2729
+ required: string[];
2730
+ };
2731
+ };
2732
+ };
2733
+ };
2734
+ };
2735
+ };
2736
+ };
2737
+ }, {
2738
+ sub: unknown;
2739
+ }>;
2740
+ oauth2EndSession: import("better-auth").StrictEndpoint<"/oauth2/end-session", {
2741
+ method: ("GET" | "POST")[];
2742
+ body: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
2743
+ id_token_hint: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2744
+ client_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2745
+ post_logout_redirect_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
2746
+ state: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2747
+ }, import("zod/v4/core").$strip>>;
2748
+ query: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
2749
+ id_token_hint: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2750
+ client_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2751
+ post_logout_redirect_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
2752
+ state: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2753
+ }, import("zod/v4/core").$strip>>;
2754
+ metadata: {
2755
+ noStore: boolean;
2756
+ allowedMediaTypes: string[];
2757
+ $Infer: {
2758
+ body: {
2759
+ id_token_hint?: string;
2760
+ client_id?: string;
2761
+ post_logout_redirect_uri?: string;
2762
+ state?: string;
2763
+ } | {
2764
+ query: {
2765
+ id_token_hint?: string;
2766
+ client_id?: string;
2767
+ post_logout_redirect_uri?: string;
2768
+ state?: string;
2769
+ };
2770
+ };
2771
+ query: {
2772
+ id_token_hint?: string;
2773
+ client_id?: string;
2774
+ post_logout_redirect_uri?: string;
2775
+ state?: string;
2776
+ };
2777
+ };
2778
+ openapi: {
2779
+ description: string;
2780
+ responses: {
2781
+ "200": {
2782
+ description: string;
2783
+ content: {
2784
+ "application/json": {
2785
+ schema: {
2786
+ type: "object";
2787
+ properties: {
2788
+ redirect_uri: {
2789
+ type: string;
2790
+ format: string;
2791
+ description: string;
2792
+ };
2793
+ message: {
2794
+ type: string;
2795
+ description: string;
2796
+ };
2797
+ };
2798
+ };
2799
+ };
2800
+ "text/html": {
2801
+ schema: {
2802
+ type: "string";
2803
+ };
2804
+ };
2805
+ };
2806
+ };
2807
+ };
2808
+ };
2809
+ };
2810
+ }, Response | {
2811
+ redirect: true;
2812
+ url: string;
2813
+ } | null>;
2814
+ oauth2EndSessionConfirmation: import("better-auth").StrictEndpoint<"/oauth2/end-session/confirm", {
2815
+ method: "POST";
2816
+ body: import("better-auth").ZodObject<{
2817
+ action: import("better-auth").ZodLiteral<"confirm">;
2818
+ }, import("zod/v4/core").$strip>;
2819
+ metadata: {
2820
+ noStore: boolean;
2821
+ allowedMediaTypes: string[];
2822
+ scope: "http";
2823
+ };
2824
+ }, Response | {
2825
+ redirect: true;
2826
+ url: string;
2827
+ } | null>;
2828
+ registerOAuthClient: import("better-auth").StrictEndpoint<"/oauth2/register", {
2829
+ method: "POST";
2830
+ body: import("better-auth").ZodObject<{
2831
+ redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
2832
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2833
+ client_name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2834
+ client_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2835
+ logo_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2836
+ contacts: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
2837
+ tos_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2838
+ policy_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2839
+ software_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2840
+ software_version: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2841
+ software_statement: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2842
+ post_logout_redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
2843
+ backchannel_logout_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
2844
+ backchannel_logout_session_required: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2845
+ token_endpoint_auth_method: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2846
+ jwks: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
2847
+ keys: import("better-auth").ZodArray<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>;
2848
+ }, import("zod/v4/core").$strip>>;
2849
+ jwks_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
2850
+ grant_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
2851
+ response_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
2852
+ code: "code";
2853
+ }>>>;
2854
+ application_type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
2855
+ web: "web";
2856
+ native: "native";
2857
+ }>>;
2858
+ subject_type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
2859
+ public: "public";
2860
+ pairwise: "pairwise";
2861
+ }>>;
2862
+ dpop_bound_access_tokens: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
2863
+ resources: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
2864
+ skip_consent: import("better-auth").ZodOptional<import("better-auth").ZodNever>;
2865
+ }, import("zod/v4/core").$strip>;
2866
+ errorCodesByField: {
2867
+ redirect_uris: "invalid_redirect_uri";
2868
+ post_logout_redirect_uris: "invalid_redirect_uri";
2869
+ software_statement: "invalid_software_statement";
2870
+ resources: "invalid_target";
2871
+ };
2872
+ defaultError: "invalid_client_metadata";
2873
+ metadata: {
2874
+ noStore: boolean;
2875
+ openapi: {
2876
+ description: string;
2877
+ responses: {
2878
+ "201": {
2879
+ description: string;
2880
+ content: {
2881
+ "application/json": {
2882
+ schema: {
2883
+ type: "object";
2884
+ properties: {
2885
+ client_id: {
2886
+ type: string;
2887
+ description: string;
2888
+ };
2889
+ client_secret: {
2890
+ type: string;
2891
+ description: string;
2892
+ };
2893
+ client_secret_expires_at: {
2894
+ type: string;
2895
+ description: string;
2896
+ };
2897
+ scope: {
2898
+ type: string;
2899
+ description: string;
2900
+ };
2901
+ user_id: {
2902
+ type: string;
2903
+ description: string;
2904
+ };
2905
+ client_id_issued_at: {
2906
+ type: string;
2907
+ description: string;
2908
+ };
2909
+ client_name: {
2910
+ type: string;
2911
+ description: string;
2912
+ };
2913
+ client_uri: {
2914
+ type: string;
2915
+ description: string;
2916
+ };
2917
+ logo_uri: {
2918
+ type: string;
2919
+ description: string;
2920
+ };
2921
+ contacts: {
2922
+ type: string;
2923
+ items: {
2924
+ type: string;
2925
+ };
2926
+ description: string;
2927
+ };
2928
+ tos_uri: {
2929
+ type: string;
2930
+ description: string;
2931
+ };
2932
+ policy_uri: {
2933
+ type: string;
2934
+ description: string;
2935
+ };
2936
+ software_id: {
2937
+ type: string;
2938
+ description: string;
2939
+ };
2940
+ software_version: {
2941
+ type: string;
2942
+ description: string;
2943
+ };
2944
+ software_statement: {
2945
+ type: string;
2946
+ description: string;
2947
+ };
2948
+ redirect_uris: {
2949
+ type: string;
2950
+ items: {
2951
+ type: string;
2952
+ format: string;
2953
+ };
2954
+ description: string;
2955
+ };
2956
+ post_logout_redirect_uris: {
2957
+ type: string;
2958
+ items: {
2959
+ type: string;
2960
+ format: string;
2961
+ };
2962
+ description: string;
2963
+ };
2964
+ backchannel_logout_uri: {
2965
+ type: string;
2966
+ format: string;
2967
+ description: string;
2968
+ };
2969
+ backchannel_logout_session_required: {
2970
+ type: string;
2971
+ description: string;
2972
+ };
2973
+ token_endpoint_auth_method: {
2974
+ type: string;
2975
+ description: string;
2976
+ };
2977
+ grant_types: {
2978
+ type: string;
2979
+ items: {
2980
+ type: string;
2981
+ };
2982
+ description: string;
2983
+ };
2984
+ response_types: {
2985
+ type: string;
2986
+ items: {
2987
+ type: string;
2988
+ enum: string[];
2989
+ };
2990
+ description: string;
2991
+ };
2992
+ application_type: {
2993
+ type: string;
2994
+ description: string;
2995
+ enum: string[];
2996
+ };
2997
+ resources: {
2998
+ type: string;
2999
+ items: {
3000
+ type: string;
3001
+ format: string;
3002
+ };
3003
+ description: string;
3004
+ };
3005
+ disabled: {
3006
+ type: string;
3007
+ description: string;
3008
+ };
3009
+ };
3010
+ required: string[];
3011
+ };
3012
+ };
3013
+ };
3014
+ };
3015
+ };
3016
+ };
3017
+ };
3018
+ }, import("@better-auth/oauth-provider").OAuthClientRegistrationResponse>;
3019
+ adminCreateOAuthClient: import("better-auth").StrictEndpoint<"/admin/oauth2/create-client", {
3020
+ method: "POST";
3021
+ body: import("better-auth").ZodObject<{
3022
+ redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3023
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3024
+ client_name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3025
+ client_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3026
+ logo_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3027
+ contacts: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3028
+ tos_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3029
+ policy_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3030
+ software_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3031
+ software_version: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3032
+ software_statement: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3033
+ post_logout_redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3034
+ backchannel_logout_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
3035
+ backchannel_logout_session_required: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3036
+ token_endpoint_auth_method: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3037
+ application_type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
3038
+ web: "web";
3039
+ native: "native";
3040
+ }>>;
3041
+ jwks: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
3042
+ keys: import("better-auth").ZodArray<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>;
3043
+ }, import("zod/v4/core").$strip>>;
3044
+ jwks_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3045
+ grant_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3046
+ client_credentials_scopes: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3047
+ resources: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3048
+ response_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
3049
+ code: "code";
3050
+ }>>>;
3051
+ client_secret_expires_at: import("better-auth").ZodDefault<import("better-auth").ZodOptional<import("better-auth").ZodUnion<readonly [import("better-auth").ZodString, import("better-auth").ZodNumber]>>>;
3052
+ skip_consent: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3053
+ enable_end_session: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3054
+ require_pkce: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3055
+ dpop_bound_access_tokens: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3056
+ subject_type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
3057
+ public: "public";
3058
+ pairwise: "pairwise";
3059
+ }>>;
3060
+ metadata: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>;
3061
+ }, import("zod/v4/core").$strip>;
3062
+ metadata: {
3063
+ noStore: boolean;
3064
+ SERVER_ONLY: true;
3065
+ openapi: {
3066
+ description: string;
3067
+ responses: {
3068
+ "201": {
3069
+ description: string;
3070
+ content: {
3071
+ "application/json": {
3072
+ schema: {
3073
+ type: "object";
3074
+ properties: {
3075
+ client_id: {
3076
+ type: string;
3077
+ description: string;
3078
+ };
3079
+ client_secret: {
3080
+ type: string;
3081
+ description: string;
3082
+ };
3083
+ client_secret_expires_at: {
3084
+ type: string;
3085
+ description: string;
3086
+ };
3087
+ scope: {
3088
+ type: string;
3089
+ description: string;
3090
+ };
3091
+ client_credentials_scopes: {
3092
+ type: string;
3093
+ items: {
3094
+ type: string;
3095
+ };
3096
+ description: string;
3097
+ };
3098
+ user_id: {
3099
+ type: string;
3100
+ description: string;
3101
+ };
3102
+ client_id_issued_at: {
3103
+ type: string;
3104
+ description: string;
3105
+ };
3106
+ client_name: {
3107
+ type: string;
3108
+ description: string;
3109
+ };
3110
+ client_uri: {
3111
+ type: string;
3112
+ description: string;
3113
+ };
3114
+ logo_uri: {
3115
+ type: string;
3116
+ description: string;
3117
+ };
3118
+ contacts: {
3119
+ type: string;
3120
+ items: {
3121
+ type: string;
3122
+ };
3123
+ description: string;
3124
+ };
3125
+ tos_uri: {
3126
+ type: string;
3127
+ description: string;
3128
+ };
3129
+ policy_uri: {
3130
+ type: string;
3131
+ description: string;
3132
+ };
3133
+ software_id: {
3134
+ type: string;
3135
+ description: string;
3136
+ };
3137
+ software_version: {
3138
+ type: string;
3139
+ description: string;
3140
+ };
3141
+ software_statement: {
3142
+ type: string;
3143
+ description: string;
3144
+ };
3145
+ redirect_uris: {
3146
+ type: string;
3147
+ items: {
3148
+ type: string;
3149
+ format: string;
3150
+ };
3151
+ description: string;
3152
+ };
3153
+ token_endpoint_auth_method: {
3154
+ type: string;
3155
+ description: string;
3156
+ };
3157
+ grant_types: {
3158
+ type: string;
3159
+ items: {
3160
+ type: string;
3161
+ };
3162
+ description: string;
3163
+ };
3164
+ response_types: {
3165
+ type: string;
3166
+ items: {
3167
+ type: string;
3168
+ enum: string[];
3169
+ };
3170
+ description: string;
3171
+ };
3172
+ application_type: {
3173
+ type: string;
3174
+ description: string;
3175
+ enum: string[];
3176
+ };
3177
+ resources: {
3178
+ type: string;
3179
+ items: {
3180
+ type: string;
3181
+ format: string;
3182
+ };
3183
+ description: string;
3184
+ };
3185
+ disabled: {
3186
+ type: string;
3187
+ description: string;
3188
+ };
3189
+ require_pkce: {
3190
+ type: string;
3191
+ description: string;
3192
+ default: boolean;
3193
+ };
3194
+ metadata: {
3195
+ type: string;
3196
+ additionalProperties: boolean;
3197
+ nullable: boolean;
3198
+ description: string;
3199
+ };
3200
+ };
3201
+ required: string[];
3202
+ };
3203
+ };
3204
+ };
3205
+ };
3206
+ };
3207
+ };
3208
+ };
3209
+ }, import("@better-auth/oauth-provider").OAuthClientAdministrativeResponse>;
3210
+ createOAuthClient: import("better-auth").StrictEndpoint<"/oauth2/create-client", {
3211
+ method: "POST";
3212
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3213
+ session: {
3214
+ session: Record<string, any> & {
3215
+ id: string;
3216
+ createdAt: Date;
3217
+ updatedAt: Date;
3218
+ userId: string;
3219
+ expiresAt: Date;
3220
+ token: string;
3221
+ ipAddress?: string | null | undefined;
3222
+ userAgent?: string | null | undefined;
3223
+ };
3224
+ user: Record<string, any> & {
3225
+ id: string;
3226
+ createdAt: Date;
3227
+ updatedAt: Date;
3228
+ email: string;
3229
+ emailVerified: boolean;
3230
+ name: string;
3231
+ image?: string | null | undefined;
3232
+ };
3233
+ };
3234
+ }>>[];
3235
+ body: import("better-auth").ZodObject<{
3236
+ redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3237
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3238
+ client_name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3239
+ client_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3240
+ logo_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3241
+ contacts: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3242
+ tos_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3243
+ policy_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3244
+ software_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3245
+ software_version: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3246
+ software_statement: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3247
+ post_logout_redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3248
+ backchannel_logout_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
3249
+ backchannel_logout_session_required: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3250
+ token_endpoint_auth_method: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3251
+ application_type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
3252
+ web: "web";
3253
+ native: "native";
3254
+ }>>;
3255
+ jwks: import("better-auth").ZodOptional<import("better-auth").ZodObject<{
3256
+ keys: import("better-auth").ZodArray<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>;
3257
+ }, import("zod/v4/core").$strip>>;
3258
+ jwks_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3259
+ grant_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3260
+ response_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
3261
+ code: "code";
3262
+ }>>>;
3263
+ dpop_bound_access_tokens: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3264
+ }, import("zod/v4/core").$strip>;
3265
+ metadata: {
3266
+ noStore: boolean;
3267
+ openapi: {
3268
+ description: string;
3269
+ responses: {
3270
+ "201": {
3271
+ description: string;
3272
+ content: {
3273
+ "application/json": {
3274
+ schema: {
3275
+ type: "object";
3276
+ properties: {
3277
+ client_id: {
3278
+ type: string;
3279
+ description: string;
3280
+ };
3281
+ client_secret: {
3282
+ type: string;
3283
+ description: string;
3284
+ };
3285
+ client_secret_expires_at: {
3286
+ type: string;
3287
+ description: string;
3288
+ };
3289
+ scope: {
3290
+ type: string;
3291
+ description: string;
3292
+ };
3293
+ user_id: {
3294
+ type: string;
3295
+ description: string;
3296
+ };
3297
+ client_id_issued_at: {
3298
+ type: string;
3299
+ description: string;
3300
+ };
3301
+ client_name: {
3302
+ type: string;
3303
+ description: string;
3304
+ };
3305
+ client_uri: {
3306
+ type: string;
3307
+ description: string;
3308
+ };
3309
+ logo_uri: {
3310
+ type: string;
3311
+ description: string;
3312
+ };
3313
+ contacts: {
3314
+ type: string;
3315
+ items: {
3316
+ type: string;
3317
+ };
3318
+ description: string;
3319
+ };
3320
+ tos_uri: {
3321
+ type: string;
3322
+ description: string;
3323
+ };
3324
+ policy_uri: {
3325
+ type: string;
3326
+ description: string;
3327
+ };
3328
+ software_id: {
3329
+ type: string;
3330
+ description: string;
3331
+ };
3332
+ software_version: {
3333
+ type: string;
3334
+ description: string;
3335
+ };
3336
+ software_statement: {
3337
+ type: string;
3338
+ description: string;
3339
+ };
3340
+ redirect_uris: {
3341
+ type: string;
3342
+ items: {
3343
+ type: string;
3344
+ format: string;
3345
+ };
3346
+ description: string;
3347
+ };
3348
+ token_endpoint_auth_method: {
3349
+ type: string;
3350
+ description: string;
3351
+ };
3352
+ grant_types: {
3353
+ type: string;
3354
+ items: {
3355
+ type: string;
3356
+ };
3357
+ description: string;
3358
+ };
3359
+ response_types: {
3360
+ type: string;
3361
+ items: {
3362
+ type: string;
3363
+ enum: string[];
3364
+ };
3365
+ description: string;
3366
+ };
3367
+ application_type: {
3368
+ type: string;
3369
+ description: string;
3370
+ enum: string[];
3371
+ };
3372
+ resources: {
3373
+ type: string;
3374
+ items: {
3375
+ type: string;
3376
+ format: string;
3377
+ };
3378
+ description: string;
3379
+ };
3380
+ disabled: {
3381
+ type: string;
3382
+ description: string;
3383
+ };
3384
+ metadata: {
3385
+ type: string;
3386
+ additionalProperties: boolean;
3387
+ nullable: boolean;
3388
+ description: string;
3389
+ };
3390
+ };
3391
+ required: string[];
3392
+ };
3393
+ };
3394
+ };
3395
+ };
3396
+ };
3397
+ };
3398
+ };
3399
+ }, import("@better-auth/oauth-provider").OAuthClientRegistrationResponse>;
3400
+ getOAuthClient: import("better-auth").StrictEndpoint<"/oauth2/get-client", {
3401
+ method: "GET";
3402
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3403
+ session: {
3404
+ session: Record<string, any> & {
3405
+ id: string;
3406
+ createdAt: Date;
3407
+ updatedAt: Date;
3408
+ userId: string;
3409
+ expiresAt: Date;
3410
+ token: string;
3411
+ ipAddress?: string | null | undefined;
3412
+ userAgent?: string | null | undefined;
3413
+ };
3414
+ user: Record<string, any> & {
3415
+ id: string;
3416
+ createdAt: Date;
3417
+ updatedAt: Date;
3418
+ email: string;
3419
+ emailVerified: boolean;
3420
+ name: string;
3421
+ image?: string | null | undefined;
3422
+ };
3423
+ };
3424
+ }>>[];
3425
+ query: import("better-auth").ZodObject<{
3426
+ client_id: import("better-auth").ZodString;
3427
+ }, import("zod/v4/core").$strip>;
3428
+ metadata: {
3429
+ openapi: {
3430
+ description: string;
3431
+ };
3432
+ };
3433
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3434
+ getOAuthClientPublic: import("better-auth").StrictEndpoint<"/oauth2/public-client", {
3435
+ method: "GET";
3436
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3437
+ session: {
3438
+ session: Record<string, any> & {
3439
+ id: string;
3440
+ createdAt: Date;
3441
+ updatedAt: Date;
3442
+ userId: string;
3443
+ expiresAt: Date;
3444
+ token: string;
3445
+ ipAddress?: string | null | undefined;
3446
+ userAgent?: string | null | undefined;
3447
+ };
3448
+ user: Record<string, any> & {
3449
+ id: string;
3450
+ createdAt: Date;
3451
+ updatedAt: Date;
3452
+ email: string;
3453
+ emailVerified: boolean;
3454
+ name: string;
3455
+ image?: string | null | undefined;
3456
+ };
3457
+ };
3458
+ }>>[];
3459
+ query: import("better-auth").ZodObject<{
3460
+ client_id: import("better-auth").ZodString;
3461
+ }, import("zod/v4/core").$strip>;
3462
+ metadata: {
3463
+ openapi: {
3464
+ description: string;
3465
+ };
3466
+ };
3467
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3468
+ getOAuthClientPublicPrelogin: import("better-auth").StrictEndpoint<"/oauth2/public-client-prelogin", {
3469
+ method: "POST";
3470
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<void>>[];
3471
+ body: import("better-auth").ZodObject<{
3472
+ client_id: import("better-auth").ZodString;
3473
+ oauth_query: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3474
+ }, import("zod/v4/core").$strip>;
3475
+ metadata: {
3476
+ openapi: {
3477
+ description: string;
3478
+ };
3479
+ };
3480
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3481
+ getOAuthClients: import("better-auth").StrictEndpoint<"/oauth2/get-clients", {
3482
+ method: "GET";
3483
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3484
+ session: {
3485
+ session: Record<string, any> & {
3486
+ id: string;
3487
+ createdAt: Date;
3488
+ updatedAt: Date;
3489
+ userId: string;
3490
+ expiresAt: Date;
3491
+ token: string;
3492
+ ipAddress?: string | null | undefined;
3493
+ userAgent?: string | null | undefined;
3494
+ };
3495
+ user: Record<string, any> & {
3496
+ id: string;
3497
+ createdAt: Date;
3498
+ updatedAt: Date;
3499
+ email: string;
3500
+ emailVerified: boolean;
3501
+ name: string;
3502
+ image?: string | null | undefined;
3503
+ };
3504
+ };
3505
+ }>>[];
3506
+ metadata: {
3507
+ openapi: {
3508
+ description: string;
3509
+ };
3510
+ };
3511
+ }, import("@better-auth/oauth-provider").OAuthClient[] | null>;
3512
+ adminUpdateOAuthClient: import("better-auth").StrictEndpoint<"/admin/oauth2/update-client", {
3513
+ method: "PATCH";
3514
+ body: import("better-auth").ZodObject<{
3515
+ client_id: import("better-auth").ZodString;
3516
+ update: import("better-auth").ZodObject<{
3517
+ redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3518
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3519
+ client_name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3520
+ client_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3521
+ logo_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3522
+ contacts: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3523
+ tos_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3524
+ policy_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3525
+ software_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3526
+ software_version: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3527
+ software_statement: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3528
+ post_logout_redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3529
+ backchannel_logout_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
3530
+ backchannel_logout_session_required: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3531
+ application_type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
3532
+ web: "web";
3533
+ native: "native";
3534
+ }>>;
3535
+ grant_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3536
+ client_credentials_scopes: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3537
+ response_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
3538
+ code: "code";
3539
+ }>>>;
3540
+ client_secret_expires_at: import("better-auth").ZodOptional<import("better-auth").ZodUnion<readonly [import("better-auth").ZodString, import("better-auth").ZodNumber]>>;
3541
+ skip_consent: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3542
+ enable_end_session: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3543
+ disabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3544
+ dpop_bound_access_tokens: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3545
+ metadata: import("better-auth").ZodOptional<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>;
3546
+ }, import("zod/v4/core").$strip>;
3547
+ }, import("zod/v4/core").$strip>;
3548
+ metadata: {
3549
+ SERVER_ONLY: true;
3550
+ openapi: {
3551
+ description: string;
3552
+ };
3553
+ };
3554
+ }, import("@better-auth/oauth-provider").OAuthClientAdministrativeResponse>;
3555
+ updateOAuthClient: import("better-auth").StrictEndpoint<"/oauth2/update-client", {
3556
+ method: "POST";
3557
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3558
+ session: {
3559
+ session: Record<string, any> & {
3560
+ id: string;
3561
+ createdAt: Date;
3562
+ updatedAt: Date;
3563
+ userId: string;
3564
+ expiresAt: Date;
3565
+ token: string;
3566
+ ipAddress?: string | null | undefined;
3567
+ userAgent?: string | null | undefined;
3568
+ };
3569
+ user: Record<string, any> & {
3570
+ id: string;
3571
+ createdAt: Date;
3572
+ updatedAt: Date;
3573
+ email: string;
3574
+ emailVerified: boolean;
3575
+ name: string;
3576
+ image?: string | null | undefined;
3577
+ };
3578
+ };
3579
+ }>>[];
3580
+ body: import("better-auth").ZodObject<{
3581
+ client_id: import("better-auth").ZodString;
3582
+ update: import("better-auth").ZodObject<{
3583
+ redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3584
+ scope: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3585
+ client_name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3586
+ client_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3587
+ logo_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3588
+ contacts: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3589
+ tos_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3590
+ policy_uri: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3591
+ software_id: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3592
+ software_version: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3593
+ software_statement: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3594
+ post_logout_redirect_uris: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodURL>>;
3595
+ backchannel_logout_uri: import("better-auth").ZodOptional<import("better-auth").ZodURL>;
3596
+ backchannel_logout_session_required: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3597
+ application_type: import("better-auth").ZodOptional<import("better-auth").ZodEnum<{
3598
+ web: "web";
3599
+ native: "native";
3600
+ }>>;
3601
+ grant_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodString>>;
3602
+ response_types: import("better-auth").ZodOptional<import("better-auth").ZodArray<import("better-auth").ZodEnum<{
3603
+ code: "code";
3604
+ }>>>;
3605
+ }, import("zod/v4/core").$strip>;
3606
+ }, import("zod/v4/core").$strip>;
3607
+ metadata: {
3608
+ openapi: {
3609
+ description: string;
3610
+ };
3611
+ };
3612
+ }, import("@better-auth/oauth-provider").OAuthClientRegistrationResponse>;
3613
+ rotateClientSecret: import("better-auth").StrictEndpoint<"/oauth2/client/rotate-secret", {
3614
+ method: "POST";
3615
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3616
+ session: {
3617
+ session: Record<string, any> & {
3618
+ id: string;
3619
+ createdAt: Date;
3620
+ updatedAt: Date;
3621
+ userId: string;
3622
+ expiresAt: Date;
3623
+ token: string;
3624
+ ipAddress?: string | null | undefined;
3625
+ userAgent?: string | null | undefined;
3626
+ };
3627
+ user: Record<string, any> & {
3628
+ id: string;
3629
+ createdAt: Date;
3630
+ updatedAt: Date;
3631
+ email: string;
3632
+ emailVerified: boolean;
3633
+ name: string;
3634
+ image?: string | null | undefined;
3635
+ };
3636
+ };
3637
+ }>>[];
3638
+ body: import("better-auth").ZodObject<{
3639
+ client_id: import("better-auth").ZodString;
3640
+ }, import("zod/v4/core").$strip>;
3641
+ metadata: {
3642
+ noStore: boolean;
3643
+ openapi: {
3644
+ description: string;
3645
+ };
3646
+ };
3647
+ }, import("@better-auth/oauth-provider").OAuthClient>;
3648
+ rotateClientKeys: import("better-auth").StrictEndpoint<"/oauth2/client/rotate-keys", {
3649
+ method: "POST";
3650
+ body: import("better-auth").ZodObject<{
3651
+ client_assertion: import("better-auth").ZodString;
3652
+ client_assertion_type: import("better-auth").ZodString;
3653
+ jwks: import("better-auth").ZodObject<{
3654
+ keys: import("better-auth").ZodArray<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>;
3655
+ }, import("zod/v4/core").$strip>;
3656
+ }, import("zod/v4/core").$strip>;
3657
+ errorCodesByField: {
3658
+ client_assertion: "invalid_client";
3659
+ client_assertion_type: "invalid_client";
3660
+ jwks: "invalid_client_metadata";
3661
+ };
3662
+ metadata: {
3663
+ noStore: boolean;
3664
+ openapi: {
3665
+ description: string;
3666
+ };
3667
+ };
3668
+ }, {
3669
+ client_id: string;
3670
+ jwks: {
3671
+ keys: Record<string, unknown>[];
3672
+ };
3673
+ }>;
3674
+ deleteOAuthClient: import("better-auth").StrictEndpoint<"/oauth2/delete-client", {
3675
+ method: "POST";
3676
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3677
+ session: {
3678
+ session: Record<string, any> & {
3679
+ id: string;
3680
+ createdAt: Date;
3681
+ updatedAt: Date;
3682
+ userId: string;
3683
+ expiresAt: Date;
3684
+ token: string;
3685
+ ipAddress?: string | null | undefined;
3686
+ userAgent?: string | null | undefined;
3687
+ };
3688
+ user: Record<string, any> & {
3689
+ id: string;
3690
+ createdAt: Date;
3691
+ updatedAt: Date;
3692
+ email: string;
3693
+ emailVerified: boolean;
3694
+ name: string;
3695
+ image?: string | null | undefined;
3696
+ };
3697
+ };
3698
+ }>>[];
3699
+ body: import("better-auth").ZodObject<{
3700
+ client_id: import("better-auth").ZodString;
3701
+ }, import("zod/v4/core").$strip>;
3702
+ metadata: {
3703
+ openapi: {
3704
+ description: string;
3705
+ };
3706
+ };
3707
+ }, void>;
3708
+ getOAuthConsent: import("better-auth").StrictEndpoint<"/oauth2/get-consent", {
3709
+ method: "GET";
3710
+ query: import("better-auth").ZodObject<{
3711
+ id: import("better-auth").ZodString;
3712
+ }, import("zod/v4/core").$strip>;
3713
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3714
+ session: {
3715
+ session: Record<string, any> & {
3716
+ id: string;
3717
+ createdAt: Date;
3718
+ updatedAt: Date;
3719
+ userId: string;
3720
+ expiresAt: Date;
3721
+ token: string;
3722
+ ipAddress?: string | null | undefined;
3723
+ userAgent?: string | null | undefined;
3724
+ };
3725
+ user: Record<string, any> & {
3726
+ id: string;
3727
+ createdAt: Date;
3728
+ updatedAt: Date;
3729
+ email: string;
3730
+ emailVerified: boolean;
3731
+ name: string;
3732
+ image?: string | null | undefined;
3733
+ };
3734
+ };
3735
+ }>>[];
3736
+ metadata: {
3737
+ openapi: {
3738
+ description: string;
3739
+ };
3740
+ };
3741
+ }, import("@better-auth/oauth-provider").OAuthConsent<import("@better-auth/oauth-provider").Scope[]>>;
3742
+ getOAuthConsents: import("better-auth").StrictEndpoint<"/oauth2/get-consents", {
3743
+ method: "GET";
3744
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3745
+ session: {
3746
+ session: Record<string, any> & {
3747
+ id: string;
3748
+ createdAt: Date;
3749
+ updatedAt: Date;
3750
+ userId: string;
3751
+ expiresAt: Date;
3752
+ token: string;
3753
+ ipAddress?: string | null | undefined;
3754
+ userAgent?: string | null | undefined;
3755
+ };
3756
+ user: Record<string, any> & {
3757
+ id: string;
3758
+ createdAt: Date;
3759
+ updatedAt: Date;
3760
+ email: string;
3761
+ emailVerified: boolean;
3762
+ name: string;
3763
+ image?: string | null | undefined;
3764
+ };
3765
+ };
3766
+ }>>[];
3767
+ metadata: {
3768
+ openapi: {
3769
+ description: string;
3770
+ };
3771
+ };
3772
+ }, import("@better-auth/oauth-provider").OAuthConsent<import("@better-auth/oauth-provider").Scope[]>[]>;
3773
+ updateOAuthConsent: import("better-auth").StrictEndpoint<"/oauth2/update-consent", {
3774
+ method: "POST";
3775
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3776
+ session: {
3777
+ session: Record<string, any> & {
3778
+ id: string;
3779
+ createdAt: Date;
3780
+ updatedAt: Date;
3781
+ userId: string;
3782
+ expiresAt: Date;
3783
+ token: string;
3784
+ ipAddress?: string | null | undefined;
3785
+ userAgent?: string | null | undefined;
3786
+ };
3787
+ user: Record<string, any> & {
3788
+ id: string;
3789
+ createdAt: Date;
3790
+ updatedAt: Date;
3791
+ email: string;
3792
+ emailVerified: boolean;
3793
+ name: string;
3794
+ image?: string | null | undefined;
3795
+ };
3796
+ };
3797
+ }>>[];
3798
+ body: import("better-auth").ZodObject<{
3799
+ id: import("better-auth").ZodString;
3800
+ update: import("better-auth").ZodObject<{
3801
+ scopes: import("better-auth").ZodArray<import("better-auth").ZodString>;
3802
+ }, import("zod/v4/core").$strip>;
3803
+ }, import("zod/v4/core").$strip>;
3804
+ metadata: {
3805
+ openapi: {
3806
+ description: string;
3807
+ };
3808
+ };
3809
+ }, import("@better-auth/oauth-provider").OAuthConsent<import("@better-auth/oauth-provider").Scope[]> | null>;
3810
+ deleteOAuthConsent: import("better-auth").StrictEndpoint<"/oauth2/delete-consent", {
3811
+ method: "POST";
3812
+ use: import("better-auth").Middleware<import("better-auth").MiddlewareOptions, (inputContext: import("better-auth").MiddlewareInputContext<import("better-auth").MiddlewareOptions>) => Promise<{
3813
+ session: {
3814
+ session: Record<string, any> & {
3815
+ id: string;
3816
+ createdAt: Date;
3817
+ updatedAt: Date;
3818
+ userId: string;
3819
+ expiresAt: Date;
3820
+ token: string;
3821
+ ipAddress?: string | null | undefined;
3822
+ userAgent?: string | null | undefined;
3823
+ };
3824
+ user: Record<string, any> & {
3825
+ id: string;
3826
+ createdAt: Date;
3827
+ updatedAt: Date;
3828
+ email: string;
3829
+ emailVerified: boolean;
3830
+ name: string;
3831
+ image?: string | null | undefined;
3832
+ };
3833
+ };
3834
+ }>>[];
3835
+ body: import("better-auth").ZodObject<{
3836
+ id: import("better-auth").ZodString;
3837
+ }, import("zod/v4/core").$strip>;
3838
+ metadata: {
3839
+ openapi: {
3840
+ description: string;
3841
+ };
3842
+ };
3843
+ }, void>;
3844
+ adminCreateOAuthResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources", {
3845
+ method: "POST";
3846
+ body: import("better-auth").ZodObject<{
3847
+ identifier: import("better-auth").ZodNonOptional<import("better-auth").ZodOptional<import("better-auth").ZodString>>;
3848
+ name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3849
+ accessTokenTtl: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodNumber>>;
3850
+ refreshTokenTtl: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodNumber>>;
3851
+ signingAlgorithm: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodEnum<{
3852
+ RS256: "RS256";
3853
+ PS256: "PS256";
3854
+ ES256: "ES256";
3855
+ ES512: "ES512";
3856
+ EdDSA: "EdDSA";
3857
+ }>>>;
3858
+ signingKeyId: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodString>>;
3859
+ allowedScopes: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodArray<import("better-auth").ZodString>>>;
3860
+ customClaims: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>>;
3861
+ dpopBoundAccessTokensRequired: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3862
+ disabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3863
+ metadata: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>>;
3864
+ }, import("zod/v4/core").$strip>;
3865
+ metadata: {
3866
+ SERVER_ONLY: true;
3867
+ };
3868
+ }, import("@better-auth/oauth-provider").OAuthResource>;
3869
+ adminListOAuthResources: import("better-auth").StrictEndpoint<"/admin/oauth2/resources", {
3870
+ method: "GET";
3871
+ metadata: {
3872
+ SERVER_ONLY: true;
3873
+ };
3874
+ }, import("@better-auth/oauth-provider").OAuthResource[]>;
3875
+ adminGetOAuthResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources/:identifier", {
3876
+ method: "GET";
3877
+ metadata: {
3878
+ SERVER_ONLY: true;
3879
+ };
3880
+ }, import("@better-auth/oauth-provider").OAuthResource>;
3881
+ adminUpdateOAuthResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources/:identifier", {
3882
+ method: "PATCH";
3883
+ body: import("better-auth").ZodObject<{
3884
+ identifier: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3885
+ name: import("better-auth").ZodOptional<import("better-auth").ZodString>;
3886
+ accessTokenTtl: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodNumber>>;
3887
+ refreshTokenTtl: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodNumber>>;
3888
+ signingAlgorithm: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodEnum<{
3889
+ RS256: "RS256";
3890
+ PS256: "PS256";
3891
+ ES256: "ES256";
3892
+ ES512: "ES512";
3893
+ EdDSA: "EdDSA";
3894
+ }>>>;
3895
+ signingKeyId: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodString>>;
3896
+ allowedScopes: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodArray<import("better-auth").ZodString>>>;
3897
+ customClaims: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>>;
3898
+ dpopBoundAccessTokensRequired: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3899
+ disabled: import("better-auth").ZodOptional<import("better-auth").ZodBoolean>;
3900
+ metadata: import("better-auth").ZodOptional<import("better-auth").ZodNullable<import("better-auth").ZodRecord<import("better-auth").ZodString, import("better-auth").ZodUnknown>>>;
3901
+ }, import("zod/v4/core").$strip>;
3902
+ metadata: {
3903
+ SERVER_ONLY: true;
3904
+ };
3905
+ }, import("@better-auth/oauth-provider").OAuthResource>;
3906
+ adminDeleteOAuthResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources/:identifier", {
3907
+ method: "DELETE";
3908
+ metadata: {
3909
+ SERVER_ONLY: true;
3910
+ };
3911
+ }, {
3912
+ deleted: boolean;
3913
+ }>;
3914
+ adminLinkClientResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources/:identifier/clients/:client_id", {
3915
+ method: "POST";
3916
+ metadata: {
3917
+ SERVER_ONLY: true;
3918
+ };
3919
+ }, {
3920
+ linked: boolean;
3921
+ }>;
3922
+ adminUnlinkClientResource: import("better-auth").StrictEndpoint<"/admin/oauth2/resources/:identifier/clients/:client_id", {
3923
+ method: "DELETE";
3924
+ metadata: {
3925
+ SERVER_ONLY: true;
3926
+ };
3927
+ }, {
3928
+ unlinked: boolean;
3929
+ }>;
3930
+ };
3931
+ schema: {
3932
+ oauthClient: {
3933
+ modelName: string;
3934
+ fields: {
3935
+ clientId: {
3936
+ type: "string";
3937
+ unique: true;
3938
+ required: true;
3939
+ };
3940
+ clientSecret: {
3941
+ type: "string";
3942
+ required: false;
3943
+ };
3944
+ clientDiscoveryId: {
3945
+ type: "string";
3946
+ required: false;
3947
+ };
3948
+ disabled: {
3949
+ type: "boolean";
3950
+ defaultValue: false;
3951
+ required: false;
3952
+ };
3953
+ skipConsent: {
3954
+ type: "boolean";
3955
+ required: false;
3956
+ };
3957
+ enableEndSession: {
3958
+ type: "boolean";
3959
+ required: false;
3960
+ };
3961
+ subjectType: {
3962
+ type: "string";
3963
+ required: false;
3964
+ };
3965
+ scopes: {
3966
+ type: "string[]";
3967
+ required: false;
3968
+ };
3969
+ clientCredentialsScopes: {
3970
+ type: "string[]";
3971
+ required: false;
3972
+ defaultValue: never[];
3973
+ };
3974
+ userId: {
3975
+ type: "string";
3976
+ required: false;
3977
+ references: {
3978
+ model: string;
3979
+ field: string;
3980
+ };
3981
+ index: true;
3982
+ };
3983
+ createdAt: {
3984
+ type: "date";
3985
+ required: false;
3986
+ };
3987
+ updatedAt: {
3988
+ type: "date";
3989
+ required: false;
3990
+ };
3991
+ name: {
3992
+ type: "string";
3993
+ required: false;
3994
+ };
3995
+ uri: {
3996
+ type: "string";
3997
+ required: false;
3998
+ };
3999
+ icon: {
4000
+ type: "string";
4001
+ required: false;
4002
+ };
4003
+ contacts: {
4004
+ type: "string[]";
4005
+ required: false;
4006
+ };
4007
+ tos: {
4008
+ type: "string";
4009
+ required: false;
4010
+ };
4011
+ policy: {
4012
+ type: "string";
4013
+ required: false;
4014
+ };
4015
+ softwareId: {
4016
+ type: "string";
4017
+ required: false;
4018
+ };
4019
+ softwareVersion: {
4020
+ type: "string";
4021
+ required: false;
4022
+ };
4023
+ softwareStatement: {
4024
+ type: "string";
4025
+ required: false;
4026
+ };
4027
+ redirectUris: {
4028
+ type: "string[]";
4029
+ required: true;
4030
+ };
4031
+ postLogoutRedirectUris: {
4032
+ type: "string[]";
4033
+ required: false;
4034
+ };
4035
+ backchannelLogoutUri: {
4036
+ type: "string";
4037
+ required: false;
4038
+ };
4039
+ backchannelLogoutSessionRequired: {
4040
+ type: "boolean";
4041
+ required: false;
4042
+ };
4043
+ tokenEndpointAuthMethod: {
4044
+ type: "string";
4045
+ required: false;
4046
+ };
4047
+ applicationType: {
4048
+ type: "string";
4049
+ required: false;
4050
+ };
4051
+ jwks: {
4052
+ type: "string";
4053
+ required: false;
4054
+ };
4055
+ jwksUri: {
4056
+ type: "string";
4057
+ required: false;
4058
+ };
4059
+ grantTypes: {
4060
+ type: "string[]";
4061
+ required: false;
4062
+ };
4063
+ responseTypes: {
4064
+ type: "string[]";
4065
+ required: false;
4066
+ };
4067
+ requirePKCE: {
4068
+ type: "boolean";
4069
+ required: false;
4070
+ };
4071
+ dpopBoundAccessTokens: {
4072
+ type: "boolean";
4073
+ required: false;
4074
+ defaultValue: false;
4075
+ };
4076
+ referenceId: {
4077
+ type: "string";
4078
+ required: false;
4079
+ };
4080
+ metadata: {
4081
+ type: "json";
4082
+ required: false;
4083
+ };
4084
+ };
4085
+ };
4086
+ oauthResource: {
4087
+ modelName: string;
4088
+ fields: {
4089
+ identifier: {
4090
+ type: "string";
4091
+ required: true;
4092
+ unique: true;
4093
+ };
4094
+ name: {
4095
+ type: "string";
4096
+ required: true;
4097
+ };
4098
+ accessTokenTtl: {
4099
+ type: "number";
4100
+ required: false;
4101
+ };
4102
+ refreshTokenTtl: {
4103
+ type: "number";
4104
+ required: false;
4105
+ };
4106
+ signingAlgorithm: {
4107
+ type: "string";
4108
+ required: false;
4109
+ };
4110
+ signingKeyId: {
4111
+ type: "string";
4112
+ required: false;
4113
+ };
4114
+ allowedScopes: {
4115
+ type: "string[]";
4116
+ required: false;
4117
+ };
4118
+ customClaims: {
4119
+ type: "json";
4120
+ required: false;
4121
+ };
4122
+ dpopBoundAccessTokensRequired: {
4123
+ type: "boolean";
4124
+ required: false;
4125
+ defaultValue: false;
4126
+ };
4127
+ disabled: {
4128
+ type: "boolean";
4129
+ required: false;
4130
+ defaultValue: false;
4131
+ };
4132
+ createdAt: {
4133
+ type: "date";
4134
+ required: false;
4135
+ };
4136
+ updatedAt: {
4137
+ type: "date";
4138
+ required: false;
4139
+ };
4140
+ policyVersion: {
4141
+ type: "number";
4142
+ required: false;
4143
+ defaultValue: number;
4144
+ };
4145
+ metadata: {
4146
+ type: "json";
4147
+ required: false;
4148
+ };
4149
+ };
4150
+ };
4151
+ oauthClientResource: {
4152
+ modelName: string;
4153
+ fields: {
4154
+ clientId: {
4155
+ type: "string";
4156
+ required: true;
4157
+ references: {
4158
+ model: string;
4159
+ field: string;
4160
+ onDelete: "cascade";
4161
+ };
4162
+ index: true;
4163
+ };
4164
+ resourceId: {
4165
+ type: "string";
4166
+ required: true;
4167
+ references: {
4168
+ model: string;
4169
+ field: string;
4170
+ onDelete: "cascade";
4171
+ };
4172
+ index: true;
4173
+ };
4174
+ metadata: {
4175
+ type: "json";
4176
+ required: false;
4177
+ };
4178
+ createdAt: {
4179
+ type: "date";
4180
+ required: false;
4181
+ };
4182
+ };
4183
+ indexes: {
4184
+ fields: [string, string];
4185
+ unique: true;
4186
+ }[];
4187
+ };
4188
+ oauthRefreshToken: {
4189
+ fields: {
4190
+ token: {
4191
+ type: "string";
4192
+ required: true;
4193
+ unique: true;
4194
+ };
4195
+ clientId: {
4196
+ type: "string";
4197
+ required: true;
4198
+ references: {
4199
+ model: string;
4200
+ field: string;
4201
+ };
4202
+ index: true;
4203
+ };
4204
+ sessionId: {
4205
+ type: "string";
4206
+ required: false;
4207
+ references: {
4208
+ model: string;
4209
+ field: string;
4210
+ onDelete: "set null";
4211
+ };
4212
+ index: true;
4213
+ };
4214
+ userId: {
4215
+ type: "string";
4216
+ required: true;
4217
+ references: {
4218
+ model: string;
4219
+ field: string;
4220
+ };
4221
+ index: true;
4222
+ };
4223
+ referenceId: {
4224
+ type: "string";
4225
+ required: false;
4226
+ };
4227
+ authorizationCodeId: {
4228
+ type: "string";
4229
+ required: false;
4230
+ index: true;
4231
+ };
4232
+ resources: {
4233
+ type: "string[]";
4234
+ required: false;
4235
+ };
4236
+ requestedUserInfoClaims: {
4237
+ type: "string[]";
4238
+ required: false;
4239
+ };
4240
+ expiresAt: {
4241
+ type: "date";
4242
+ };
4243
+ createdAt: {
4244
+ type: "date";
4245
+ };
4246
+ revoked: {
4247
+ type: "date";
4248
+ required: false;
4249
+ };
4250
+ rotatedAt: {
4251
+ type: "date";
4252
+ required: false;
4253
+ };
4254
+ rotationReplayResponse: {
4255
+ type: "string";
4256
+ required: false;
4257
+ };
4258
+ rotationReplayExpiresAt: {
4259
+ type: "date";
4260
+ required: false;
4261
+ };
4262
+ authTime: {
4263
+ type: "date";
4264
+ required: false;
4265
+ };
4266
+ confirmation: {
4267
+ type: "json";
4268
+ required: false;
4269
+ };
4270
+ scopes: {
4271
+ type: "string[]";
4272
+ required: true;
4273
+ };
4274
+ };
4275
+ };
4276
+ oauthAccessToken: {
4277
+ modelName: string;
4278
+ fields: {
4279
+ token: {
4280
+ type: "string";
4281
+ unique: true;
4282
+ };
4283
+ clientId: {
4284
+ type: "string";
4285
+ required: true;
4286
+ references: {
4287
+ model: string;
4288
+ field: string;
4289
+ };
4290
+ index: true;
4291
+ };
4292
+ sessionId: {
4293
+ type: "string";
4294
+ required: false;
4295
+ references: {
4296
+ model: string;
4297
+ field: string;
4298
+ onDelete: "set null";
4299
+ };
4300
+ index: true;
4301
+ };
4302
+ userId: {
4303
+ type: "string";
4304
+ required: false;
4305
+ references: {
4306
+ model: string;
4307
+ field: string;
4308
+ };
4309
+ index: true;
4310
+ };
4311
+ referenceId: {
4312
+ type: "string";
4313
+ required: false;
4314
+ };
4315
+ authorizationCodeId: {
4316
+ type: "string";
4317
+ required: false;
4318
+ index: true;
4319
+ };
4320
+ resources: {
4321
+ type: "string[]";
4322
+ required: false;
4323
+ };
4324
+ requestedUserInfoClaims: {
4325
+ type: "string[]";
4326
+ required: false;
4327
+ };
4328
+ refreshId: {
4329
+ type: "string";
4330
+ required: false;
4331
+ references: {
4332
+ model: string;
4333
+ field: string;
4334
+ };
4335
+ index: true;
4336
+ };
4337
+ expiresAt: {
4338
+ type: "date";
4339
+ };
4340
+ createdAt: {
4341
+ type: "date";
4342
+ };
4343
+ revoked: {
4344
+ type: "date";
4345
+ required: false;
4346
+ };
4347
+ confirmation: {
4348
+ type: "json";
4349
+ required: false;
4350
+ };
4351
+ scopes: {
4352
+ type: "string[]";
4353
+ required: true;
4354
+ };
4355
+ };
4356
+ };
4357
+ oauthConsent: {
4358
+ modelName: string;
4359
+ fields: {
4360
+ clientId: {
4361
+ type: "string";
4362
+ required: true;
4363
+ references: {
4364
+ model: string;
4365
+ field: string;
4366
+ };
4367
+ index: true;
4368
+ };
4369
+ userId: {
4370
+ type: "string";
4371
+ required: false;
4372
+ references: {
4373
+ model: string;
4374
+ field: string;
4375
+ };
4376
+ index: true;
4377
+ };
4378
+ referenceId: {
4379
+ type: "string";
4380
+ required: false;
4381
+ };
4382
+ resources: {
4383
+ type: "string[]";
4384
+ required: false;
4385
+ };
4386
+ requestedUserInfoClaims: {
4387
+ type: "string[]";
4388
+ required: false;
4389
+ };
4390
+ scopes: {
4391
+ type: "string[]";
4392
+ required: true;
4393
+ };
4394
+ createdAt: {
4395
+ type: "date";
4396
+ };
4397
+ updatedAt: {
4398
+ type: "date";
4399
+ };
4400
+ };
4401
+ };
4402
+ oauthClientAssertion: {
4403
+ modelName: string;
4404
+ fields: {
4405
+ expiresAt: {
4406
+ type: "date";
4407
+ required: true;
4408
+ };
4409
+ };
4410
+ };
4411
+ };
4412
+ rateLimit: ({
4413
+ pathMatcher: (path: string) => path is "/oauth2/token";
4414
+ window: number;
4415
+ max: number;
4416
+ } | {
4417
+ pathMatcher: (path: string) => path is "/oauth2/authorize";
4418
+ window: number;
4419
+ max: number;
4420
+ } | {
4421
+ pathMatcher: (path: string) => path is "/oauth2/introspect";
4422
+ window: number;
4423
+ max: number;
4424
+ } | {
4425
+ pathMatcher: (path: string) => path is "/oauth2/revoke";
4426
+ window: number;
4427
+ max: number;
4428
+ } | {
4429
+ pathMatcher: (path: string) => path is "/oauth2/register";
4430
+ window: number;
4431
+ max: number;
4432
+ } | {
4433
+ pathMatcher: (path: string) => path is "/oauth2/client/rotate-keys";
4434
+ window: number;
4435
+ max: number;
4436
+ } | {
4437
+ pathMatcher: (path: string) => path is "/oauth2/userinfo";
4438
+ window: number;
4439
+ max: number;
4440
+ })[];
4441
+ })[]];
4442
+ database: D1Database;
4443
+ secret: string;
4444
+ baseURL: string;
4445
+ }>;
4446
+ export type BetterAuth = ReturnType<typeof make>;
4447
+ interface Held extends AuthInstance {
4448
+ /**
4449
+ * Better Auth checks its tables the moment it is made, so it is made only once they exist. With an `origin` (the address a
4450
+ * request was reached on) it is the instance whose issuer and MCP resource are that address; without, the one that
4451
+ * serves sessions and keys only. Made once each.
4452
+ */
4453
+ readonly auth: (origin?: string) => Promise<BetterAuth>;
4454
+ readonly db: D1Database;
4455
+ readonly secret: string;
4456
+ readonly worlds: boolean;
4457
+ }
4458
+ export declare const instance: (o: AuthOptions) => AuthInstance;
4459
+ export declare const held: (a: AuthInstance) => Held;
4460
+ /** Better Auth's refusals carry the HTTP status they would answer with. */
4461
+ export declare const statusOf: (e: unknown) => number | undefined;
4462
+ export {};