import type { Context as hono_Context } from 'hono'; import * as Db from '../db/Db.js'; import type * as RateLimit from './RateLimit.js'; /** * Creates Better Auth over Tempo's request-leaf Kysely handle. The handler is * not mounted; Tempo routes call the server API explicitly. * * @param source - Database source resolved for this request. * @param options - Better Auth host configuration. * @returns The configured Better Auth server instance. */ export declare function create(source: Db.Source, options: create.Options): import("better-auth").Auth<{ account: { modelName: "authAccounts"; }; advanced: { backgroundTasks?: { handler: (promise: Promise) => void; }; cookiePrefix: string; database: { generateId: ({ model }: { model: import("better-auth").ModelNames; size?: number | undefined; }) => string; }; defaultCookieAttributes: { httpOnly: true; path: string; sameSite: "lax"; secure: boolean; }; ipAddress: { ipAddressHeaders: string[]; }; useSecureCookies: false; }; basePath: string; baseURL: string; database: { db: import("kysely").Kysely; transaction: boolean; type: string; }; databaseHooks: { session: { create: { before(session: { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; } & Record, context: import("better-auth").GenericEndpointContext | null): Promise<{ data: { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; provider: any; }; } | undefined>; }; }; }; plugins: [{ id: "one-time-token"; version: string; endpoints: { generateOneTimeToken: import("better-auth").StrictEndpoint<"/one-time-token/generate", { method: "GET"; use: import("better-auth").Middleware) => Promise<{ session: { session: Record & { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; }; user: Record & { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }; }; }>>[]; }, { token: string; }>; verifyOneTimeToken: import("better-auth").StrictEndpoint<"/one-time-token/verify", { method: "POST"; body: import("better-auth").ZodObject<{ token: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; }, { session: import("better-auth").Session & Record; user: import("better-auth").User & Record; }>; }; hooks: { after: { matcher: () => true; handler: import("better-auth").Middleware) => Promise>; }[]; }; options: import("better-auth/plugins").OneTimeTokenOptions | undefined; }, ...{ id: "email-otp"; version: string; init(ctx: import("better-auth").AuthContext): { options: { emailVerification: { sendVerificationEmail(data: { user: import("better-auth").User; url: string; token: string; }, request: Request | undefined): Promise; }; }; } | undefined; endpoints: { sendVerificationOTP: import("better-auth").StrictEndpoint<"/email-otp/send-verification-otp", { method: "POST"; use: import("better-auth").Middleware) => Promise>[]; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; type: import("better-auth").ZodEnum<{ "sign-in": "sign-in"; "change-email": "change-email"; "email-verification": "email-verification"; "forget-password": "forget-password"; }>; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; createVerificationOTP: import("better-auth").StrictEndpoint; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "string"; }; }; }; }; }; }; }; }, string>; getVerificationOTP: import("better-auth").StrictEndpoint; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { "200": { description: string; content: { "application/json": { schema: { type: "object"; properties: { otp: { type: string; nullable: boolean; description: string; }; }; required: string[]; }; }; }; }; }; }; }; }, { otp: null; } | { otp: string; }>; checkVerificationOTP: import("better-auth").StrictEndpoint<"/email-otp/check-verification-otp", { method: "POST"; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; type: import("better-auth").ZodEnum<{ "sign-in": "sign-in"; "change-email": "change-email"; "email-verification": "email-verification"; "forget-password": "forget-password"; }>; otp: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; verifyEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/verify-email", { method: "POST"; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; otp: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; metadata: { openapi: { description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { status: { type: string; description: string; enum: boolean[]; }; token: { type: string; nullable: boolean; description: string; }; user: { $ref: string; }; }; required: string[]; }; }; }; }; }; }; }; }, { status: boolean; token: string; user: { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; } & Record; } | { status: boolean; token: null; user: { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; } & Record; }>; signInEmailOTP: import("better-auth").StrictEndpoint<"/sign-in/email-otp", { method: "POST"; body: import("better-auth").ZodIntersection; image: import("better-auth").ZodOptional; }, import("zod/v4/core").$strip>, import("better-auth").ZodRecord>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { token: { type: string; description: string; }; user: { $ref: string; }; }; required: string[]; }; }; }; }; }; }; }; }, { token: string; user: { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }; }>; requestPasswordResetEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/request-password-reset", { method: "POST"; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; description: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; forgetPasswordEmailOTP: import("better-auth").StrictEndpoint<"/forget-password/email-otp", { method: "POST"; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; description: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; resetPasswordEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/reset-password", { method: "POST"; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; otp: import("better-auth").ZodString; password: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; requestEmailChangeEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/request-email-change", { method: "POST"; body: import("better-auth").ZodObject<{ newEmail: import("better-auth").ZodString; otp: import("better-auth").ZodOptional; }, import("zod/v4/core").$strip>; use: import("better-auth").Middleware) => Promise<{ session: { session: Record & { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; }; user: Record & { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }; }; }>>[]; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; changeEmailEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/change-email", { method: "POST"; body: import("better-auth").ZodObject<{ newEmail: import("better-auth").ZodString; otp: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; use: import("better-auth").Middleware) => Promise<{ session: { session: Record & { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; }; user: Record & { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }; }; }>>[]; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; }; hooks: { after: { matcher(context: import("better-auth").HookEndpointContext): boolean; handler: import("better-auth").Middleware) => Promise>; }[]; }; rateLimit: ({ pathMatcher(path: string): path is "/email-otp/send-verification-otp"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/check-verification-otp"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/verify-email"; window: number; max: number; } | { pathMatcher(path: string): path is "/sign-in/email-otp"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/request-password-reset"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/reset-password"; window: number; max: number; } | { pathMatcher(path: string): path is "/forget-password/email-otp"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/request-email-change"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/change-email"; window: number; max: number; })[]; options: import("better-auth/plugins").EmailOTPOptions; $ERROR_CODES: { OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">; INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">; TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">; }; }[]]; rateLimit: { customRules: { '/sign-in/social': { max: number; window: number; }; }; customStorage: { consume(key: string, rule: { window: number; max: number; }): Promise<{ allowed: boolean; retryAfter: number | null; }>; }; enabled: true; max: number; window: number; }; secret: string; session: { additionalFields: { provider: { input: false; required: false; type: "string"; }; }; cookieCache: { enabled: false; }; disableSessionRefresh: true; expiresIn: number; modelName: "authSessions"; }; socialProviders: { google: { /** OAuth client identifier. */ clientId: string; /** OAuth client secret. */ clientSecret: string; }; } | { google?: never; }; telemetry: { enabled: false; }; trustedOrigins: string[]; user: { modelName: "users"; }; verification: { modelName: "authVerifications"; }; }>; export declare namespace create { /** Host configuration for a Better Auth instance. */ type Options = { /** Mounted path that serves Better Auth. */ basePath: string; /** Public origin used for cookie and callback URL calculations. */ baseUrl: string; /** Email OTP delivery capability. Omit to keep the plugin disabled. */ emailOtp?: { /** Sender address for sign-in emails. */ from: string; /** Sends one sign-in email. */ send: (message: create.EmailMessage) => Promise; } | undefined; /** Google OpenID Connect credentials. Omit to keep Google sign-in disabled. */ google?: { /** OAuth client identifier. */ clientId: string; /** OAuth client secret. */ clientSecret: string; } | undefined; /** Atomic store backing Better Auth's request rate limits. */ rateLimit: RateLimit.Store; /** High-entropy secret used to protect Better Auth credentials. */ secret: string; /** Whether Better Auth cookies carry the `Secure` attribute. */ secureCookies: boolean; /** Additional browser origins accepted by Better Auth. */ trustedOrigins?: readonly string[] | undefined; /** Keeps deferred Better Auth work alive after the response. */ waitUntil?: ((promise: Promise) => void) | undefined; }; /** One transactional email. */ type EmailMessage = { /** Sender address. */ from: string; /** HTML body. */ html: string; /** Subject line. */ subject: string; /** Plain-text body. */ text: string; /** Recipient address. */ to: string; }; } /** Creates a request-scoped Better Auth instance from host configuration. */ export declare function fromContext(c: hono_Context, options: fromContext.Options): import("better-auth").Auth<{ account: { modelName: "authAccounts"; }; advanced: { backgroundTasks?: { handler: (promise: Promise) => void; }; cookiePrefix: string; database: { generateId: ({ model }: { model: import("better-auth").ModelNames; size?: number | undefined; }) => string; }; defaultCookieAttributes: { httpOnly: true; path: string; sameSite: "lax"; secure: boolean; }; ipAddress: { ipAddressHeaders: string[]; }; useSecureCookies: false; }; basePath: string; baseURL: string; database: { db: import("kysely").Kysely; transaction: boolean; type: string; }; databaseHooks: { session: { create: { before(session: { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; } & Record, context: import("better-auth").GenericEndpointContext | null): Promise<{ data: { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; provider: any; }; } | undefined>; }; }; }; plugins: [{ id: "one-time-token"; version: string; endpoints: { generateOneTimeToken: import("better-auth").StrictEndpoint<"/one-time-token/generate", { method: "GET"; use: import("better-auth").Middleware) => Promise<{ session: { session: Record & { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; }; user: Record & { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }; }; }>>[]; }, { token: string; }>; verifyOneTimeToken: import("better-auth").StrictEndpoint<"/one-time-token/verify", { method: "POST"; body: import("better-auth").ZodObject<{ token: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; }, { session: import("better-auth").Session & Record; user: import("better-auth").User & Record; }>; }; hooks: { after: { matcher: () => true; handler: import("better-auth").Middleware) => Promise>; }[]; }; options: import("better-auth/plugins").OneTimeTokenOptions | undefined; }, ...{ id: "email-otp"; version: string; init(ctx: import("better-auth").AuthContext): { options: { emailVerification: { sendVerificationEmail(data: { user: import("better-auth").User; url: string; token: string; }, request: Request | undefined): Promise; }; }; } | undefined; endpoints: { sendVerificationOTP: import("better-auth").StrictEndpoint<"/email-otp/send-verification-otp", { method: "POST"; use: import("better-auth").Middleware) => Promise>[]; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; type: import("better-auth").ZodEnum<{ "sign-in": "sign-in"; "change-email": "change-email"; "email-verification": "email-verification"; "forget-password": "forget-password"; }>; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; createVerificationOTP: import("better-auth").StrictEndpoint; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "string"; }; }; }; }; }; }; }; }, string>; getVerificationOTP: import("better-auth").StrictEndpoint; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { "200": { description: string; content: { "application/json": { schema: { type: "object"; properties: { otp: { type: string; nullable: boolean; description: string; }; }; required: string[]; }; }; }; }; }; }; }; }, { otp: null; } | { otp: string; }>; checkVerificationOTP: import("better-auth").StrictEndpoint<"/email-otp/check-verification-otp", { method: "POST"; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; type: import("better-auth").ZodEnum<{ "sign-in": "sign-in"; "change-email": "change-email"; "email-verification": "email-verification"; "forget-password": "forget-password"; }>; otp: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; verifyEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/verify-email", { method: "POST"; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; otp: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; metadata: { openapi: { description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { status: { type: string; description: string; enum: boolean[]; }; token: { type: string; nullable: boolean; description: string; }; user: { $ref: string; }; }; required: string[]; }; }; }; }; }; }; }; }, { status: boolean; token: string; user: { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; } & Record; } | { status: boolean; token: null; user: { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; } & Record; }>; signInEmailOTP: import("better-auth").StrictEndpoint<"/sign-in/email-otp", { method: "POST"; body: import("better-auth").ZodIntersection; image: import("better-auth").ZodOptional; }, import("zod/v4/core").$strip>, import("better-auth").ZodRecord>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { token: { type: string; description: string; }; user: { $ref: string; }; }; required: string[]; }; }; }; }; }; }; }; }, { token: string; user: { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }; }>; requestPasswordResetEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/request-password-reset", { method: "POST"; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; description: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; forgetPasswordEmailOTP: import("better-auth").StrictEndpoint<"/forget-password/email-otp", { method: "POST"; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; description: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; resetPasswordEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/reset-password", { method: "POST"; body: import("better-auth").ZodObject<{ email: import("better-auth").ZodString; otp: import("better-auth").ZodString; password: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; requestEmailChangeEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/request-email-change", { method: "POST"; body: import("better-auth").ZodObject<{ newEmail: import("better-auth").ZodString; otp: import("better-auth").ZodOptional; }, import("zod/v4/core").$strip>; use: import("better-auth").Middleware) => Promise<{ session: { session: Record & { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; }; user: Record & { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }; }; }>>[]; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; changeEmailEmailOTP: import("better-auth").StrictEndpoint<"/email-otp/change-email", { method: "POST"; body: import("better-auth").ZodObject<{ newEmail: import("better-auth").ZodString; otp: import("better-auth").ZodString; }, import("zod/v4/core").$strip>; use: import("better-auth").Middleware) => Promise<{ session: { session: Record & { id: string; createdAt: Date; updatedAt: Date; userId: string; expiresAt: Date; token: string; ipAddress?: string | null | undefined; userAgent?: string | null | undefined; }; user: Record & { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }; }; }>>[]; metadata: { openapi: { operationId: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { success: { type: string; }; }; }; }; }; }; }; }; }; }, { success: boolean; }>; }; hooks: { after: { matcher(context: import("better-auth").HookEndpointContext): boolean; handler: import("better-auth").Middleware) => Promise>; }[]; }; rateLimit: ({ pathMatcher(path: string): path is "/email-otp/send-verification-otp"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/check-verification-otp"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/verify-email"; window: number; max: number; } | { pathMatcher(path: string): path is "/sign-in/email-otp"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/request-password-reset"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/reset-password"; window: number; max: number; } | { pathMatcher(path: string): path is "/forget-password/email-otp"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/request-email-change"; window: number; max: number; } | { pathMatcher(path: string): path is "/email-otp/change-email"; window: number; max: number; })[]; options: import("better-auth/plugins").EmailOTPOptions; $ERROR_CODES: { OTP_EXPIRED: import("better-auth").RawError<"OTP_EXPIRED">; INVALID_OTP: import("better-auth").RawError<"INVALID_OTP">; TOO_MANY_ATTEMPTS: import("better-auth").RawError<"TOO_MANY_ATTEMPTS">; }; }[]]; rateLimit: { customRules: { '/sign-in/social': { max: number; window: number; }; }; customStorage: { consume(key: string, rule: { window: number; max: number; }): Promise<{ allowed: boolean; retryAfter: number | null; }>; }; enabled: true; max: number; window: number; }; secret: string; session: { additionalFields: { provider: { input: false; required: false; type: "string"; }; }; cookieCache: { enabled: false; }; disableSessionRefresh: true; expiresIn: number; modelName: "authSessions"; }; socialProviders: { google: { /** OAuth client identifier. */ clientId: string; /** OAuth client secret. */ clientSecret: string; }; } | { google?: never; }; telemetry: { enabled: false; }; trustedOrigins: string[]; user: { modelName: "users"; }; verification: { modelName: "authVerifications"; }; }>; /** Returns the request with the host-resolved client IP in a private header. */ export declare function request(c: hono_Context, options: fromContext.Options): Request; export declare namespace fromContext { /** Static Better Auth configuration derived by the host app. */ type Options = Omit & { /** Resolves a client IP from trusted runtime or proxy metadata. */ clientIp: (request: Request) => string | undefined; /** Database source resolved for this Better Auth instance. */ db: Db.Source; /** Transactional email capability, or undefined when email is unavailable. */ email: Email | undefined; }; /** Minimal transactional email capability provided by the host. */ type Email = { /** Sender address for sign-in emails. */ from: string; /** Sends one sign-in email. */ send: (message: create.EmailMessage) => Promise; }; } /** Raised if a mounted Better Auth route requests an unsupported rate-limit window. */ export declare class UnsupportedRateLimitWindowError extends Error { name: string; constructor(window: number); } /** Raised if code accidentally enables an unsupported Better Auth OTP purpose. */ export declare class UnsupportedOtpTypeError extends Error { name: string; } //# sourceMappingURL=BetterAuth.d.ts.map