import { OverrideMerge, Prettify as Prettify$1, UnionToIntersection } from "../types/helper.mjs";
import { AdditionalSessionFieldsInput, AdditionalUserFieldsInput } from "../types/models.mjs";
import { isAPIError } from "../utils/is-api-error.mjs";
import { DispatchContext, dispatchAuthEndpoint } from "./dispatch.mjs";
import { requireOrgRole, requireResourceOwnership } from "./middlewares/authorization.mjs";
import { formCsrfMiddleware, originCheck, originCheckMiddleware } from "./middlewares/origin-check.mjs";
import { accountInfo, getAccessToken, linkSocialAccount, listUserAccounts, refreshToken, unlinkAccount } from "./routes/account.mjs";
import { callbackOAuth } from "./routes/callback.mjs";
import { createEmailVerificationToken, sendVerificationEmail, sendVerificationEmailFn, verifyEmail } from "./routes/email-verification.mjs";
import { error } from "./routes/error.mjs";
import { ok } from "./routes/ok.mjs";
import { requestPasswordReset, requestPasswordResetCallback, resetPassword, verifyPassword } from "./routes/password.mjs";
import { freshSessionMiddleware, getAuthoritativeSessionFromCtx, getSession, getSessionFromCtx, isStateful, listSessions, requestOnlySessionMiddleware, revokeOtherSessions, revokeSession, revokeSessions, sensitiveSessionMiddleware, sessionMiddleware } from "./routes/session.mjs";
import { signInEmail, signInSocial } from "./routes/sign-in.mjs";
import { signOut } from "./routes/sign-out.mjs";
import { signUpEmail } from "./routes/sign-up.mjs";
import { updateSession } from "./routes/update-session.mjs";
import { changeEmail, changePassword, deleteUser, deleteUserCallback, setPassword, updateUser } from "./routes/update-user.mjs";
import { getOAuthState } from "./state/oauth.mjs";
import { getShouldSkipSessionRefresh, setShouldSkipSessionRefresh } from "./state/should-session-refresh.mjs";
import { AuthContext, Awaitable, BetterAuthOptions, BetterAuthPlugin } from "@better-auth/core";
import * as _$_better_auth_core_db0 from "@better-auth/core/db";
import { InternalLogger } from "@better-auth/core/env";
import { APIError } from "@better-auth/core/error";
import * as _$_better_auth_core_oauth20 from "@better-auth/core/oauth2";
import { getIp } from "@better-auth/core/utils/ip";
import * as _$better_call0 from "better-call";
import { Middleware } from "better-call";
import { AuthEndpoint, AuthMiddleware, createAuthEndpoint, createAuthMiddleware, optionsMiddleware } from "@better-auth/core/api";
import * as _$zod from "zod";
import * as _$zod_v4_core0 from "zod/v4/core";

//#region src/api/index.d.ts
declare function checkEndpointConflicts(options: BetterAuthOptions, logger: InternalLogger): void;
declare function getEndpoints<Option extends BetterAuthOptions>(ctx: Awaitable<AuthContext>, options: Option): {
  api: OverrideMerge<{
    readonly ok: _$better_call0.StrictEndpoint<"/ok", {
      method: "GET";
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      ok: {
                        type: string;
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
        scope: "server";
      };
    }, {
      ok: boolean;
    }>;
    readonly error: _$better_call0.StrictEndpoint<"/error", {
      method: "GET";
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "text/html": {
                  schema: {
                    type: "string";
                    description: string;
                  };
                };
              };
            };
          };
        };
        scope: "server";
      };
    }, Response>;
    readonly signInSocial: _$better_call0.StrictEndpoint<"/sign-in/social", {
      method: "POST";
      operationId: string;
      body: _$zod.ZodObject<{
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        newUserCallbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        errorCallbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        provider: _$zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, _$zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
        disableRedirect: _$zod.ZodOptional<_$zod.ZodBoolean>;
        idToken: _$zod.ZodOptional<_$zod.ZodObject<{
          token: _$zod.ZodString;
          nonce: _$zod.ZodOptional<_$zod.ZodString>;
          accessToken: _$zod.ZodOptional<_$zod.ZodString>;
          refreshToken: _$zod.ZodOptional<_$zod.ZodString>;
          expiresAt: _$zod.ZodOptional<_$zod.ZodNumber>;
          user: _$zod.ZodOptional<_$zod.ZodObject<{
            name: _$zod.ZodOptional<_$zod.ZodObject<{
              firstName: _$zod.ZodOptional<_$zod.ZodString>;
              lastName: _$zod.ZodOptional<_$zod.ZodString>;
            }, _$zod_v4_core0.$strip>>;
            email: _$zod.ZodOptional<_$zod.ZodString>;
          }, _$zod_v4_core0.$strip>>;
        }, _$zod_v4_core0.$strip>>;
        scopes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
        requestSignUp: _$zod.ZodOptional<_$zod.ZodBoolean>;
        loginHint: _$zod.ZodOptional<_$zod.ZodString>;
        additionalData: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        $Infer: {
          body: _$zod.infer<_$zod.ZodObject<{
            callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
            newUserCallbackURL: _$zod.ZodOptional<_$zod.ZodString>;
            errorCallbackURL: _$zod.ZodOptional<_$zod.ZodString>;
            provider: _$zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, _$zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
            disableRedirect: _$zod.ZodOptional<_$zod.ZodBoolean>;
            idToken: _$zod.ZodOptional<_$zod.ZodObject<{
              token: _$zod.ZodString;
              nonce: _$zod.ZodOptional<_$zod.ZodString>;
              accessToken: _$zod.ZodOptional<_$zod.ZodString>;
              refreshToken: _$zod.ZodOptional<_$zod.ZodString>;
              expiresAt: _$zod.ZodOptional<_$zod.ZodNumber>;
              user: _$zod.ZodOptional<_$zod.ZodObject<{
                name: _$zod.ZodOptional<_$zod.ZodObject<{
                  firstName: _$zod.ZodOptional<_$zod.ZodString>;
                  lastName: _$zod.ZodOptional<_$zod.ZodString>;
                }, _$zod_v4_core0.$strip>>;
                email: _$zod.ZodOptional<_$zod.ZodString>;
              }, _$zod_v4_core0.$strip>>;
            }, _$zod_v4_core0.$strip>>;
            scopes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
            requestSignUp: _$zod.ZodOptional<_$zod.ZodBoolean>;
            loginHint: _$zod.ZodOptional<_$zod.ZodString>;
            additionalData: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>>;
          }, _$zod_v4_core0.$strip>>;
          returned: {
            redirect: boolean;
            token?: string | undefined;
            url?: string | undefined;
            user?: ({
              id: string;
              createdAt: Date;
              updatedAt: Date;
              email: string;
              emailVerified: boolean;
              name: string;
              image?: string | null | undefined;
            } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T ? { [K in keyof T]: T[K] } : never) | undefined;
          };
        };
        openapi: {
          description: string;
          operationId: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    description: string;
                    properties: {
                      token: {
                        type: string;
                      };
                      user: {
                        type: string;
                        $ref: string;
                      };
                      url: {
                        type: string;
                      };
                      redirect: {
                        type: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      redirect: boolean;
      url: string;
    } | {
      redirect: boolean;
      token: string;
      url: undefined;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_1 ? { [K in keyof T_1]: T_1[K] } : never;
    }>;
    readonly callbackOAuth: _$better_call0.StrictEndpoint<"/callback/:id", {
      method: ("GET" | "POST")[];
      operationId: string;
      body: _$zod.ZodOptional<_$zod.ZodObject<{
        code: _$zod.ZodOptional<_$zod.ZodString>;
        error: _$zod.ZodOptional<_$zod.ZodString>;
        device_id: _$zod.ZodOptional<_$zod.ZodString>;
        error_description: _$zod.ZodOptional<_$zod.ZodString>;
        state: _$zod.ZodOptional<_$zod.ZodString>;
        user: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>>;
      query: _$zod.ZodOptional<_$zod.ZodObject<{
        code: _$zod.ZodOptional<_$zod.ZodString>;
        error: _$zod.ZodOptional<_$zod.ZodString>;
        device_id: _$zod.ZodOptional<_$zod.ZodString>;
        error_description: _$zod.ZodOptional<_$zod.ZodString>;
        state: _$zod.ZodOptional<_$zod.ZodString>;
        user: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>>;
      metadata: {
        allowedMediaTypes: string[];
        scope: "server";
      };
    }, never>;
    readonly getSession: _$better_call0.StrictEndpoint<"/get-session", {
      method: ("GET" | "POST")[];
      operationId: string;
      query: _$zod.ZodOptional<_$zod.ZodObject<{
        disableCookieCache: _$zod.ZodOptional<_$zod.ZodCoercedBoolean<unknown>>;
        disableRefresh: _$zod.ZodOptional<_$zod.ZodCoercedBoolean<unknown>>;
      }, _$zod_v4_core0.$strip>>;
      requireHeaders: true;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      session: {
                        $ref: string;
                      };
                      user: {
                        $ref: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      session: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        userId: string;
        expiresAt: Date;
        token: string;
        ipAddress?: string | null | undefined;
        userAgent?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["session"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"session", Option["plugins"]> extends infer T_2 ? { [K_1 in keyof T_2]: T_2[K_1] } : never;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_3 ? { [K in keyof T_3]: T_3[K] } : never;
    } | null>;
    readonly signOut: _$better_call0.StrictEndpoint<"/sign-out", {
      method: "POST";
      operationId: string;
      requireHeaders: true;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      success: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      success: boolean;
    }>;
    readonly signUpEmail: _$better_call0.StrictEndpoint<"/sign-up/email", {
      method: "POST";
      operationId: string;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
      body: _$zod.ZodIntersection<_$zod.ZodObject<{
        name: _$zod.ZodString;
        email: _$zod.ZodEmail;
        password: _$zod.ZodString;
        image: _$zod.ZodOptional<_$zod.ZodString>;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        rememberMe: _$zod.ZodOptional<_$zod.ZodBoolean>;
      }, _$zod_v4_core0.$strip>, _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>>;
      cloneRequest: true;
      metadata: {
        allowedMediaTypes: string[];
        $Infer: {
          body: {
            name: string;
            email: string;
            password: string;
            image?: string | undefined;
            callbackURL?: string | undefined;
            rememberMe?: boolean | undefined;
          } & _$_better_auth_core_db0.InferDBFieldsFromPluginsInput<"user", Option["plugins"]> & _$_better_auth_core_db0.InferDBFieldsFromOptionsInput<Option["user"]>;
          returned: {
            token: string | null;
            user: {
              id: string;
              createdAt: Date;
              updatedAt: Date;
              email: string;
              emailVerified: boolean;
              name: string;
              image?: string | null | undefined;
            } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_4 ? { [K in keyof T_4]: T_4[K] } : never;
          };
        };
        openapi: {
          operationId: string;
          description: string;
          requestBody: {
            content: {
              "application/json": {
                schema: {
                  type: "object";
                  properties: {
                    name: {
                      type: string;
                      description: string;
                    };
                    email: {
                      type: string;
                      description: string;
                    };
                    password: {
                      type: string;
                      description: string;
                    };
                    image: {
                      type: string;
                      description: string;
                    };
                    callbackURL: {
                      type: string;
                      description: string;
                    };
                    rememberMe: {
                      type: string;
                      description: string;
                    };
                  };
                  required: string[];
                };
              };
            };
          };
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      token: {
                        type: string;
                        nullable: boolean;
                        description: string;
                      };
                      user: {
                        type: string;
                        properties: {
                          id: {
                            type: string;
                            description: string;
                          };
                          email: {
                            type: string;
                            format: string;
                            description: string;
                          };
                          name: {
                            type: string;
                            description: string;
                          };
                          image: {
                            type: string;
                            format: string;
                            nullable: boolean;
                            description: string;
                          };
                          emailVerified: {
                            type: string;
                            description: string;
                          };
                          createdAt: {
                            type: string;
                            format: string;
                            description: string;
                          };
                          updatedAt: {
                            type: string;
                            format: string;
                            description: string;
                          };
                        };
                        required: string[];
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
            "422": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      message: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      token: null;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_5 ? { [K in keyof T_5]: T_5[K] } : never;
    } | {
      token: string;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_6 ? { [K in keyof T_6]: T_6[K] } : never;
    }>;
    readonly signInEmail: _$better_call0.StrictEndpoint<"/sign-in/email", {
      method: "POST";
      operationId: string;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
      cloneRequest: true;
      body: _$zod.ZodObject<{
        email: _$zod.ZodString;
        password: _$zod.ZodString;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        rememberMe: _$zod.ZodOptional<_$zod.ZodDefault<_$zod.ZodBoolean>>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        allowedMediaTypes: string[];
        $Infer: {
          body: {
            email: string;
            password: string;
            callbackURL?: string | undefined;
            rememberMe?: boolean | undefined;
          };
          returned: {
            redirect: boolean;
            token: string;
            url?: string | undefined;
            user: {
              id: string;
              createdAt: Date;
              updatedAt: Date;
              email: string;
              emailVerified: boolean;
              name: string;
              image?: string | null | undefined;
            } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_7 ? { [K in keyof T_7]: T_7[K] } : never;
          };
        };
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    description: string;
                    properties: {
                      redirect: {
                        type: string;
                        enum: boolean[];
                      };
                      token: {
                        type: string;
                        description: string;
                      };
                      url: {
                        type: string;
                        nullable: boolean;
                      };
                      user: {
                        type: string;
                        $ref: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      redirect: boolean;
      token: string;
      url?: string | undefined;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_8 ? { [K in keyof T_8]: T_8[K] } : never;
    }>;
    readonly resetPassword: _$better_call0.StrictEndpoint<"/reset-password", {
      method: "POST";
      operationId: string;
      query: _$zod.ZodOptional<_$zod.ZodObject<{
        token: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>>;
      body: _$zod.ZodObject<{
        newPassword: _$zod.ZodString;
        token: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly verifyPassword: _$better_call0.StrictEndpoint<"/verify-password", {
      method: "POST";
      body: _$zod.ZodObject<{
        password: _$zod.ZodString;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        scope: "server";
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
    }, {
      status: boolean;
    }>;
    readonly verifyEmail: _$better_call0.StrictEndpoint<"/verify-email", {
      method: "GET";
      operationId: string;
      query: _$zod.ZodObject<{
        token: _$zod.ZodString;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
      metadata: {
        openapi: {
          description: string;
          parameters: ({
            name: string;
            in: "query";
            description: string;
            required: true;
            schema: {
              type: "string";
            };
          } | {
            name: string;
            in: "query";
            description: string;
            required: false;
            schema: {
              type: "string";
            };
          })[];
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      user: {
                        type: string;
                        $ref: string;
                      };
                      status: {
                        type: string;
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, void | {
      status: boolean;
    }>;
    readonly sendVerificationEmail: _$better_call0.StrictEndpoint<"/send-verification-email", {
      method: "POST";
      operationId: string;
      cloneRequest: true;
      body: _$zod.ZodObject<{
        email: _$zod.ZodEmail;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          requestBody: {
            content: {
              "application/json": {
                schema: {
                  type: "object";
                  properties: {
                    email: {
                      type: string;
                      description: string;
                      example: string;
                    };
                    callbackURL: {
                      type: string;
                      description: string;
                      example: string;
                      nullable: boolean;
                    };
                  };
                  required: string[];
                };
              };
            };
          };
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                        description: string;
                        example: boolean;
                      };
                    };
                  };
                };
              };
            };
            "400": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      message: {
                        type: string;
                        description: string;
                        example: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly changeEmail: _$better_call0.StrictEndpoint<"/change-email", {
      method: "POST";
      body: _$zod.ZodObject<{
        newEmail: _$zod.ZodEmail;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        openapi: {
          operationId: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      user: {
                        type: string;
                        $ref: string;
                      };
                      status: {
                        type: string;
                        description: string;
                      };
                      message: {
                        type: string;
                        enum: string[];
                        description: string;
                        nullable: boolean;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly changePassword: _$better_call0.StrictEndpoint<"/change-password", {
      method: "POST";
      operationId: string;
      body: _$zod.ZodObject<{
        newPassword: _$zod.ZodString;
        currentPassword: _$zod.ZodString;
        revokeOtherSessions: _$zod.ZodOptional<_$zod.ZodBoolean>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            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: {
                      token: {
                        type: string;
                        nullable: boolean;
                        description: string;
                      };
                      user: {
                        type: string;
                        properties: {
                          id: {
                            type: string;
                            description: string;
                          };
                          email: {
                            type: string;
                            format: string;
                            description: string;
                          };
                          name: {
                            type: string;
                            description: string;
                          };
                          image: {
                            type: string;
                            format: string;
                            nullable: boolean;
                            description: string;
                          };
                          emailVerified: {
                            type: string;
                            description: string;
                          };
                          createdAt: {
                            type: string;
                            format: string;
                            description: string;
                          };
                          updatedAt: {
                            type: string;
                            format: string;
                            description: string;
                          };
                        };
                        required: string[];
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      token: string | null;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & Record<string, any> & {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      };
    }>;
    readonly setPassword: _$better_call0.StrictEndpoint<string, {
      method: "POST";
      body: _$zod.ZodObject<{
        newPassword: _$zod.ZodString;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
    }, {
      status: boolean;
    }>;
    readonly updateSession: _$better_call0.StrictEndpoint<"/update-session", {
      method: "POST";
      operationId: string;
      body: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        $Infer: {
          body: Partial<AdditionalSessionFieldsInput<Option>>;
        };
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      session: {
                        type: string;
                        $ref: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      session: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        userId: string;
        expiresAt: Date;
        token: string;
        ipAddress?: string | null | undefined;
        userAgent?: string | null | undefined;
      };
    }>;
    readonly updateUser: _$better_call0.StrictEndpoint<"/update-user", {
      method: "POST";
      operationId: string;
      body: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        $Infer: {
          body: Partial<AdditionalUserFieldsInput<Option>> & {
            name?: string | undefined;
            image?: string | undefined | null;
          };
        };
        openapi: {
          operationId: string;
          description: string;
          requestBody: {
            content: {
              "application/json": {
                schema: {
                  type: "object";
                  properties: {
                    name: {
                      type: string;
                      description: string;
                    };
                    image: {
                      type: string;
                      description: string;
                      nullable: boolean;
                    };
                  };
                };
              };
            };
          };
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      user: {
                        type: string;
                        $ref: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly deleteUser: _$better_call0.StrictEndpoint<"/delete-user", {
      method: "POST";
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      body: _$zod.ZodObject<{
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        password: _$zod.ZodOptional<_$zod.ZodString>;
        token: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          requestBody: {
            content: {
              "application/json": {
                schema: {
                  type: "object";
                  properties: {
                    callbackURL: {
                      type: string;
                      description: string;
                    };
                    password: {
                      type: string;
                      description: string;
                    };
                    token: {
                      type: string;
                      description: string;
                    };
                  };
                };
              };
            };
          };
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      success: {
                        type: string;
                        description: string;
                      };
                      message: {
                        type: string;
                        enum: string[];
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      success: boolean;
      message: string;
    }>;
    readonly requestPasswordReset: _$better_call0.StrictEndpoint<"/request-password-reset", {
      method: "POST";
      body: _$zod.ZodObject<{
        email: _$zod.ZodEmail;
        redirectTo: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                      };
                      message: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
    }, {
      status: boolean;
      message: string;
    }>;
    readonly requestPasswordResetCallback: _$better_call0.StrictEndpoint<"/reset-password/:token", {
      method: "GET";
      operationId: string;
      query: _$zod.ZodObject<{
        callbackURL: _$zod.ZodString;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          parameters: ({
            name: string;
            in: "path";
            required: true;
            description: string;
            schema: {
              type: "string";
            };
          } | {
            name: string;
            in: "query";
            required: true;
            description: string;
            schema: {
              type: "string";
            };
          })[];
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      token: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, never>;
    readonly listSessions: _$better_call0.StrictEndpoint<"/list-sessions", {
      method: "GET";
      operationId: string;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      requireHeaders: true;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "array";
                    items: {
                      $ref: string;
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, Prettify$1<{
      id: string;
      createdAt: Date;
      updatedAt: Date;
      userId: string;
      expiresAt: Date;
      token: string;
      ipAddress?: string | null | undefined;
      userAgent?: string | null | undefined;
    } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["session"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"session", Option["plugins"]> extends infer T_9 ? { [K_1 in keyof T_9]: T_9[K_1] } : never>[]>;
    readonly revokeSession: _$better_call0.StrictEndpoint<"/revoke-session", {
      method: "POST";
      body: _$zod.ZodObject<{
        token: _$zod.ZodString;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      requireHeaders: true;
      metadata: {
        openapi: {
          description: string;
          requestBody: {
            content: {
              "application/json": {
                schema: {
                  type: "object";
                  properties: {
                    token: {
                      type: string;
                      description: string;
                    };
                  };
                  required: string[];
                };
              };
            };
          };
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly revokeSessions: _$better_call0.StrictEndpoint<"/revoke-sessions", {
      method: "POST";
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      requireHeaders: true;
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly revokeOtherSessions: _$better_call0.StrictEndpoint<"/revoke-other-sessions", {
      method: "POST";
      requireHeaders: true;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly linkSocialAccount: _$better_call0.StrictEndpoint<"/link-social", {
      method: "POST";
      requireHeaders: true;
      body: _$zod.ZodObject<{
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        provider: _$zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, _$zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
        idToken: _$zod.ZodOptional<_$zod.ZodObject<{
          token: _$zod.ZodString;
          nonce: _$zod.ZodOptional<_$zod.ZodString>;
          accessToken: _$zod.ZodOptional<_$zod.ZodString>;
          refreshToken: _$zod.ZodOptional<_$zod.ZodString>;
          scopes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
        }, _$zod_v4_core0.$strip>>;
        requestSignUp: _$zod.ZodOptional<_$zod.ZodBoolean>;
        scopes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
        errorCallbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        disableRedirect: _$zod.ZodOptional<_$zod.ZodBoolean>;
        additionalData: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        openapi: {
          description: string;
          operationId: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      url: {
                        type: string;
                        description: string;
                      };
                      redirect: {
                        type: string;
                        description: string;
                      };
                      status: {
                        type: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      url: string;
      redirect: boolean;
    }>;
    readonly listUserAccounts: _$better_call0.StrictEndpoint<"/list-accounts", {
      method: "GET";
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            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: "array";
                    items: {
                      type: string;
                      properties: {
                        id: {
                          type: string;
                        };
                        providerId: {
                          type: string;
                        };
                        createdAt: {
                          type: string;
                          format: string;
                        };
                        updatedAt: {
                          type: string;
                          format: string;
                        };
                        accountId: {
                          type: string;
                        };
                        userId: {
                          type: string;
                        };
                        scopes: {
                          type: string;
                          items: {
                            type: string;
                          };
                        };
                      };
                      required: string[];
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      scopes: string[];
      id: string;
      createdAt: Date;
      updatedAt: Date;
      userId: string;
      providerId: string;
      accountId: string;
    }[]>;
    readonly deleteUserCallback: _$better_call0.StrictEndpoint<"/delete-user/callback", {
      method: "GET";
      query: _$zod.ZodObject<{
        token: _$zod.ZodString;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      success: {
                        type: string;
                        description: string;
                      };
                      message: {
                        type: string;
                        enum: string[];
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      success: boolean;
      message: string;
    }>;
    readonly unlinkAccount: _$better_call0.StrictEndpoint<"/unlink-account", {
      method: "POST";
      body: _$zod.ZodObject<{
        providerId: _$zod.ZodString;
        accountId: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly refreshToken: _$better_call0.StrictEndpoint<"/refresh-token", {
      method: "POST";
      body: _$zod.ZodObject<{
        providerId: _$zod.ZodString;
        accountId: _$zod.ZodOptional<_$zod.ZodString>;
        userId: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          description: string;
          responses: {
            200: {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      tokenType: {
                        type: string;
                      };
                      idToken: {
                        type: string;
                      };
                      accessToken: {
                        type: string;
                      };
                      refreshToken: {
                        type: string;
                      };
                      accessTokenExpiresAt: {
                        type: string;
                        format: string;
                      };
                      refreshTokenExpiresAt: {
                        type: string;
                        format: string;
                      };
                    };
                  };
                };
              };
            };
            400: {
              description: string;
            };
          };
        };
      };
    }, {
      accessToken: string | undefined;
      refreshToken: string;
      accessTokenExpiresAt: Date | undefined;
      refreshTokenExpiresAt: Date | null | undefined;
      scope: string | null | undefined;
      idToken: string | null | undefined;
      providerId: string;
      accountId: string;
    }>;
    readonly getAccessToken: _$better_call0.StrictEndpoint<"/get-access-token", {
      method: "POST";
      body: _$zod.ZodObject<{
        providerId: _$zod.ZodString;
        accountId: _$zod.ZodOptional<_$zod.ZodString>;
        userId: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          description: string;
          responses: {
            200: {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      tokenType: {
                        type: string;
                      };
                      idToken: {
                        type: string;
                      };
                      accessToken: {
                        type: string;
                      };
                      accessTokenExpiresAt: {
                        type: string;
                        format: string;
                      };
                    };
                  };
                };
              };
            };
            400: {
              description: string;
            };
          };
        };
      };
    }, {
      accessToken: string;
      accessTokenExpiresAt: Date | undefined;
      scopes: string[];
      idToken: string | undefined;
    }>;
    readonly accountInfo: _$better_call0.StrictEndpoint<"/account-info", {
      method: "GET";
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      user: {
                        type: string;
                        properties: {
                          id: {
                            type: string;
                          };
                          name: {
                            type: string;
                          };
                          email: {
                            type: string;
                          };
                          image: {
                            type: string;
                          };
                          emailVerified: {
                            type: string;
                          };
                        };
                        required: string[];
                      };
                      data: {
                        type: string;
                        properties: {};
                        additionalProperties: boolean;
                      };
                    };
                    required: string[];
                    additionalProperties: boolean;
                  };
                };
              };
            };
          };
        };
      };
      query: _$zod.ZodOptional<_$zod.ZodObject<{
        accountId: _$zod.ZodOptional<_$zod.ZodString>;
        providerId: _$zod.ZodOptional<_$zod.ZodString>;
        userId: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>>;
    }, {
      user: _$_better_auth_core_oauth20.OAuth2UserInfo;
      data: Record<string, any>;
    } | null>;
  }, UnionToIntersection<Option["plugins"] extends (infer T_10)[] ? T_10 extends BetterAuthPlugin ? T_10 extends {
    endpoints: infer E;
  } ? E : {} : {} : {}>>;
  middlewares: {
    path: string;
    middleware: Middleware;
  }[];
};
declare const router: <Option extends BetterAuthOptions>(ctx: AuthContext, options: Option) => {
  handler: (request: Request) => Promise<Response>;
  endpoints: UnionToIntersection<Option["plugins"] extends (infer T)[] ? T extends BetterAuthPlugin ? T extends {
    endpoints: infer E;
  } ? E : {} : {} : {}> extends infer T_1 ? T_1 extends UnionToIntersection<Option["plugins"] extends (infer T)[] ? T extends BetterAuthPlugin ? T extends {
    endpoints: infer E;
  } ? E : {} : {} : {}> ? T_1 extends unknown ? Prettify$1<({
    readonly ok: _$better_call0.StrictEndpoint<"/ok", {
      method: "GET";
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      ok: {
                        type: string;
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
        scope: "server";
      };
    }, {
      ok: boolean;
    }>;
    readonly error: _$better_call0.StrictEndpoint<"/error", {
      method: "GET";
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "text/html": {
                  schema: {
                    type: "string";
                    description: string;
                  };
                };
              };
            };
          };
        };
        scope: "server";
      };
    }, Response>;
    readonly signInSocial: _$better_call0.StrictEndpoint<"/sign-in/social", {
      method: "POST";
      operationId: string;
      body: _$zod.ZodObject<{
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        newUserCallbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        errorCallbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        provider: _$zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, _$zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
        disableRedirect: _$zod.ZodOptional<_$zod.ZodBoolean>;
        idToken: _$zod.ZodOptional<_$zod.ZodObject<{
          token: _$zod.ZodString;
          nonce: _$zod.ZodOptional<_$zod.ZodString>;
          accessToken: _$zod.ZodOptional<_$zod.ZodString>;
          refreshToken: _$zod.ZodOptional<_$zod.ZodString>;
          expiresAt: _$zod.ZodOptional<_$zod.ZodNumber>;
          user: _$zod.ZodOptional<_$zod.ZodObject<{
            name: _$zod.ZodOptional<_$zod.ZodObject<{
              firstName: _$zod.ZodOptional<_$zod.ZodString>;
              lastName: _$zod.ZodOptional<_$zod.ZodString>;
            }, _$zod_v4_core0.$strip>>;
            email: _$zod.ZodOptional<_$zod.ZodString>;
          }, _$zod_v4_core0.$strip>>;
        }, _$zod_v4_core0.$strip>>;
        scopes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
        requestSignUp: _$zod.ZodOptional<_$zod.ZodBoolean>;
        loginHint: _$zod.ZodOptional<_$zod.ZodString>;
        additionalData: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        $Infer: {
          body: _$zod.infer<_$zod.ZodObject<{
            callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
            newUserCallbackURL: _$zod.ZodOptional<_$zod.ZodString>;
            errorCallbackURL: _$zod.ZodOptional<_$zod.ZodString>;
            provider: _$zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, _$zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
            disableRedirect: _$zod.ZodOptional<_$zod.ZodBoolean>;
            idToken: _$zod.ZodOptional<_$zod.ZodObject<{
              token: _$zod.ZodString;
              nonce: _$zod.ZodOptional<_$zod.ZodString>;
              accessToken: _$zod.ZodOptional<_$zod.ZodString>;
              refreshToken: _$zod.ZodOptional<_$zod.ZodString>;
              expiresAt: _$zod.ZodOptional<_$zod.ZodNumber>;
              user: _$zod.ZodOptional<_$zod.ZodObject<{
                name: _$zod.ZodOptional<_$zod.ZodObject<{
                  firstName: _$zod.ZodOptional<_$zod.ZodString>;
                  lastName: _$zod.ZodOptional<_$zod.ZodString>;
                }, _$zod_v4_core0.$strip>>;
                email: _$zod.ZodOptional<_$zod.ZodString>;
              }, _$zod_v4_core0.$strip>>;
            }, _$zod_v4_core0.$strip>>;
            scopes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
            requestSignUp: _$zod.ZodOptional<_$zod.ZodBoolean>;
            loginHint: _$zod.ZodOptional<_$zod.ZodString>;
            additionalData: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>>;
          }, _$zod_v4_core0.$strip>>;
          returned: {
            redirect: boolean;
            token?: string | undefined;
            url?: string | undefined;
            user?: ({
              id: string;
              createdAt: Date;
              updatedAt: Date;
              email: string;
              emailVerified: boolean;
              name: string;
              image?: string | null | undefined;
            } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_3 ? { [K_1 in keyof T_3]: T_3[K_1] } : never) | undefined;
          };
        };
        openapi: {
          description: string;
          operationId: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    description: string;
                    properties: {
                      token: {
                        type: string;
                      };
                      user: {
                        type: string;
                        $ref: string;
                      };
                      url: {
                        type: string;
                      };
                      redirect: {
                        type: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      redirect: boolean;
      url: string;
    } | {
      redirect: boolean;
      token: string;
      url: undefined;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_4 ? { [K_1 in keyof T_4]: T_4[K_1] } : never;
    }>;
    readonly callbackOAuth: _$better_call0.StrictEndpoint<"/callback/:id", {
      method: ("GET" | "POST")[];
      operationId: string;
      body: _$zod.ZodOptional<_$zod.ZodObject<{
        code: _$zod.ZodOptional<_$zod.ZodString>;
        error: _$zod.ZodOptional<_$zod.ZodString>;
        device_id: _$zod.ZodOptional<_$zod.ZodString>;
        error_description: _$zod.ZodOptional<_$zod.ZodString>;
        state: _$zod.ZodOptional<_$zod.ZodString>;
        user: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>>;
      query: _$zod.ZodOptional<_$zod.ZodObject<{
        code: _$zod.ZodOptional<_$zod.ZodString>;
        error: _$zod.ZodOptional<_$zod.ZodString>;
        device_id: _$zod.ZodOptional<_$zod.ZodString>;
        error_description: _$zod.ZodOptional<_$zod.ZodString>;
        state: _$zod.ZodOptional<_$zod.ZodString>;
        user: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>>;
      metadata: {
        allowedMediaTypes: string[];
        scope: "server";
      };
    }, never>;
    readonly getSession: _$better_call0.StrictEndpoint<"/get-session", {
      method: ("GET" | "POST")[];
      operationId: string;
      query: _$zod.ZodOptional<_$zod.ZodObject<{
        disableCookieCache: _$zod.ZodOptional<_$zod.ZodCoercedBoolean<unknown>>;
        disableRefresh: _$zod.ZodOptional<_$zod.ZodCoercedBoolean<unknown>>;
      }, _$zod_v4_core0.$strip>>;
      requireHeaders: true;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      session: {
                        $ref: string;
                      };
                      user: {
                        $ref: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      session: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        userId: string;
        expiresAt: Date;
        token: string;
        ipAddress?: string | null | undefined;
        userAgent?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["session"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"session", Option["plugins"]> extends infer T_5 ? { [K_2 in keyof T_5]: T_5[K_2] } : never;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_6 ? { [K_1 in keyof T_6]: T_6[K_1] } : never;
    } | null>;
    readonly signOut: _$better_call0.StrictEndpoint<"/sign-out", {
      method: "POST";
      operationId: string;
      requireHeaders: true;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      success: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      success: boolean;
    }>;
    readonly signUpEmail: _$better_call0.StrictEndpoint<"/sign-up/email", {
      method: "POST";
      operationId: string;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
      body: _$zod.ZodIntersection<_$zod.ZodObject<{
        name: _$zod.ZodString;
        email: _$zod.ZodEmail;
        password: _$zod.ZodString;
        image: _$zod.ZodOptional<_$zod.ZodString>;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        rememberMe: _$zod.ZodOptional<_$zod.ZodBoolean>;
      }, _$zod_v4_core0.$strip>, _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>>;
      cloneRequest: true;
      metadata: {
        allowedMediaTypes: string[];
        $Infer: {
          body: {
            name: string;
            email: string;
            password: string;
            image?: string | undefined;
            callbackURL?: string | undefined;
            rememberMe?: boolean | undefined;
          } & _$_better_auth_core_db0.InferDBFieldsFromPluginsInput<"user", Option["plugins"]> & _$_better_auth_core_db0.InferDBFieldsFromOptionsInput<Option["user"]>;
          returned: {
            token: string | null;
            user: {
              id: string;
              createdAt: Date;
              updatedAt: Date;
              email: string;
              emailVerified: boolean;
              name: string;
              image?: string | null | undefined;
            } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_7 ? { [K_1 in keyof T_7]: T_7[K_1] } : never;
          };
        };
        openapi: {
          operationId: string;
          description: string;
          requestBody: {
            content: {
              "application/json": {
                schema: {
                  type: "object";
                  properties: {
                    name: {
                      type: string;
                      description: string;
                    };
                    email: {
                      type: string;
                      description: string;
                    };
                    password: {
                      type: string;
                      description: string;
                    };
                    image: {
                      type: string;
                      description: string;
                    };
                    callbackURL: {
                      type: string;
                      description: string;
                    };
                    rememberMe: {
                      type: string;
                      description: string;
                    };
                  };
                  required: string[];
                };
              };
            };
          };
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      token: {
                        type: string;
                        nullable: boolean;
                        description: string;
                      };
                      user: {
                        type: string;
                        properties: {
                          id: {
                            type: string;
                            description: string;
                          };
                          email: {
                            type: string;
                            format: string;
                            description: string;
                          };
                          name: {
                            type: string;
                            description: string;
                          };
                          image: {
                            type: string;
                            format: string;
                            nullable: boolean;
                            description: string;
                          };
                          emailVerified: {
                            type: string;
                            description: string;
                          };
                          createdAt: {
                            type: string;
                            format: string;
                            description: string;
                          };
                          updatedAt: {
                            type: string;
                            format: string;
                            description: string;
                          };
                        };
                        required: string[];
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
            "422": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      message: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      token: null;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_8 ? { [K_1 in keyof T_8]: T_8[K_1] } : never;
    } | {
      token: string;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_9 ? { [K_1 in keyof T_9]: T_9[K_1] } : never;
    }>;
    readonly signInEmail: _$better_call0.StrictEndpoint<"/sign-in/email", {
      method: "POST";
      operationId: string;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
      cloneRequest: true;
      body: _$zod.ZodObject<{
        email: _$zod.ZodString;
        password: _$zod.ZodString;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        rememberMe: _$zod.ZodOptional<_$zod.ZodDefault<_$zod.ZodBoolean>>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        allowedMediaTypes: string[];
        $Infer: {
          body: {
            email: string;
            password: string;
            callbackURL?: string | undefined;
            rememberMe?: boolean | undefined;
          };
          returned: {
            redirect: boolean;
            token: string;
            url?: string | undefined;
            user: {
              id: string;
              createdAt: Date;
              updatedAt: Date;
              email: string;
              emailVerified: boolean;
              name: string;
              image?: string | null | undefined;
            } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_10 ? { [K_1 in keyof T_10]: T_10[K_1] } : never;
          };
        };
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    description: string;
                    properties: {
                      redirect: {
                        type: string;
                        enum: boolean[];
                      };
                      token: {
                        type: string;
                        description: string;
                      };
                      url: {
                        type: string;
                        nullable: boolean;
                      };
                      user: {
                        type: string;
                        $ref: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      redirect: boolean;
      token: string;
      url?: string | undefined;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["user"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"user", Option["plugins"]> extends infer T_11 ? { [K_1 in keyof T_11]: T_11[K_1] } : never;
    }>;
    readonly resetPassword: _$better_call0.StrictEndpoint<"/reset-password", {
      method: "POST";
      operationId: string;
      query: _$zod.ZodOptional<_$zod.ZodObject<{
        token: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>>;
      body: _$zod.ZodObject<{
        newPassword: _$zod.ZodString;
        token: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly verifyPassword: _$better_call0.StrictEndpoint<"/verify-password", {
      method: "POST";
      body: _$zod.ZodObject<{
        password: _$zod.ZodString;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        scope: "server";
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
    }, {
      status: boolean;
    }>;
    readonly verifyEmail: _$better_call0.StrictEndpoint<"/verify-email", {
      method: "GET";
      operationId: string;
      query: _$zod.ZodObject<{
        token: _$zod.ZodString;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
      metadata: {
        openapi: {
          description: string;
          parameters: ({
            name: string;
            in: "query";
            description: string;
            required: true;
            schema: {
              type: "string";
            };
          } | {
            name: string;
            in: "query";
            description: string;
            required: false;
            schema: {
              type: "string";
            };
          })[];
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      user: {
                        type: string;
                        $ref: string;
                      };
                      status: {
                        type: string;
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, void | {
      status: boolean;
    }>;
    readonly sendVerificationEmail: _$better_call0.StrictEndpoint<"/send-verification-email", {
      method: "POST";
      operationId: string;
      cloneRequest: true;
      body: _$zod.ZodObject<{
        email: _$zod.ZodEmail;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          requestBody: {
            content: {
              "application/json": {
                schema: {
                  type: "object";
                  properties: {
                    email: {
                      type: string;
                      description: string;
                      example: string;
                    };
                    callbackURL: {
                      type: string;
                      description: string;
                      example: string;
                      nullable: boolean;
                    };
                  };
                  required: string[];
                };
              };
            };
          };
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                        description: string;
                        example: boolean;
                      };
                    };
                  };
                };
              };
            };
            "400": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      message: {
                        type: string;
                        description: string;
                        example: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly changeEmail: _$better_call0.StrictEndpoint<"/change-email", {
      method: "POST";
      body: _$zod.ZodObject<{
        newEmail: _$zod.ZodEmail;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        openapi: {
          operationId: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      user: {
                        type: string;
                        $ref: string;
                      };
                      status: {
                        type: string;
                        description: string;
                      };
                      message: {
                        type: string;
                        enum: string[];
                        description: string;
                        nullable: boolean;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly changePassword: _$better_call0.StrictEndpoint<"/change-password", {
      method: "POST";
      operationId: string;
      body: _$zod.ZodObject<{
        newPassword: _$zod.ZodString;
        currentPassword: _$zod.ZodString;
        revokeOtherSessions: _$zod.ZodOptional<_$zod.ZodBoolean>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            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: {
                      token: {
                        type: string;
                        nullable: boolean;
                        description: string;
                      };
                      user: {
                        type: string;
                        properties: {
                          id: {
                            type: string;
                            description: string;
                          };
                          email: {
                            type: string;
                            format: string;
                            description: string;
                          };
                          name: {
                            type: string;
                            description: string;
                          };
                          image: {
                            type: string;
                            format: string;
                            nullable: boolean;
                            description: string;
                          };
                          emailVerified: {
                            type: string;
                            description: string;
                          };
                          createdAt: {
                            type: string;
                            format: string;
                            description: string;
                          };
                          updatedAt: {
                            type: string;
                            format: string;
                            description: string;
                          };
                        };
                        required: string[];
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      token: string | null;
      user: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      } & Record<string, any> & {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        email: string;
        emailVerified: boolean;
        name: string;
        image?: string | null | undefined;
      };
    }>;
    readonly setPassword: _$better_call0.StrictEndpoint<string, {
      method: "POST";
      body: _$zod.ZodObject<{
        newPassword: _$zod.ZodString;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
    }, {
      status: boolean;
    }>;
    readonly updateSession: _$better_call0.StrictEndpoint<"/update-session", {
      method: "POST";
      operationId: string;
      body: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        $Infer: {
          body: Partial<AdditionalSessionFieldsInput<Option>>;
        };
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      session: {
                        type: string;
                        $ref: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      session: {
        id: string;
        createdAt: Date;
        updatedAt: Date;
        userId: string;
        expiresAt: Date;
        token: string;
        ipAddress?: string | null | undefined;
        userAgent?: string | null | undefined;
      };
    }>;
    readonly updateUser: _$better_call0.StrictEndpoint<"/update-user", {
      method: "POST";
      operationId: string;
      body: _$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        $Infer: {
          body: Partial<AdditionalUserFieldsInput<Option>> & {
            name?: string | undefined;
            image?: string | undefined | null;
          };
        };
        openapi: {
          operationId: string;
          description: string;
          requestBody: {
            content: {
              "application/json": {
                schema: {
                  type: "object";
                  properties: {
                    name: {
                      type: string;
                      description: string;
                    };
                    image: {
                      type: string;
                      description: string;
                      nullable: boolean;
                    };
                  };
                };
              };
            };
          };
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      user: {
                        type: string;
                        $ref: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly deleteUser: _$better_call0.StrictEndpoint<"/delete-user", {
      method: "POST";
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      body: _$zod.ZodObject<{
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        password: _$zod.ZodOptional<_$zod.ZodString>;
        token: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          requestBody: {
            content: {
              "application/json": {
                schema: {
                  type: "object";
                  properties: {
                    callbackURL: {
                      type: string;
                      description: string;
                    };
                    password: {
                      type: string;
                      description: string;
                    };
                    token: {
                      type: string;
                      description: string;
                    };
                  };
                };
              };
            };
          };
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      success: {
                        type: string;
                        description: string;
                      };
                      message: {
                        type: string;
                        enum: string[];
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      success: boolean;
      message: string;
    }>;
    readonly requestPasswordReset: _$better_call0.StrictEndpoint<"/request-password-reset", {
      method: "POST";
      body: _$zod.ZodObject<{
        email: _$zod.ZodEmail;
        redirectTo: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                      };
                      message: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
    }, {
      status: boolean;
      message: string;
    }>;
    readonly requestPasswordResetCallback: _$better_call0.StrictEndpoint<"/reset-password/:token", {
      method: "GET";
      operationId: string;
      query: _$zod.ZodObject<{
        callbackURL: _$zod.ZodString;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          parameters: ({
            name: string;
            in: "path";
            required: true;
            description: string;
            schema: {
              type: "string";
            };
          } | {
            name: string;
            in: "query";
            required: true;
            description: string;
            schema: {
              type: "string";
            };
          })[];
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      token: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, never>;
    readonly listSessions: _$better_call0.StrictEndpoint<"/list-sessions", {
      method: "GET";
      operationId: string;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      requireHeaders: true;
      metadata: {
        openapi: {
          operationId: string;
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "array";
                    items: {
                      $ref: string;
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, Prettify$1<{
      id: string;
      createdAt: Date;
      updatedAt: Date;
      userId: string;
      expiresAt: Date;
      token: string;
      ipAddress?: string | null | undefined;
      userAgent?: string | null | undefined;
    } & _$_better_auth_core_db0.InferDBFieldsFromOptions<Option["session"]> & _$_better_auth_core_db0.InferDBFieldsFromPlugins<"session", Option["plugins"]> extends infer T_12 ? { [K_2 in keyof T_12]: T_12[K_2] } : never>[]>;
    readonly revokeSession: _$better_call0.StrictEndpoint<"/revoke-session", {
      method: "POST";
      body: _$zod.ZodObject<{
        token: _$zod.ZodString;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      requireHeaders: true;
      metadata: {
        openapi: {
          description: string;
          requestBody: {
            content: {
              "application/json": {
                schema: {
                  type: "object";
                  properties: {
                    token: {
                      type: string;
                      description: string;
                    };
                  };
                  required: string[];
                };
              };
            };
          };
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly revokeSessions: _$better_call0.StrictEndpoint<"/revoke-sessions", {
      method: "POST";
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      requireHeaders: true;
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly revokeOtherSessions: _$better_call0.StrictEndpoint<"/revoke-other-sessions", {
      method: "POST";
      requireHeaders: true;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly linkSocialAccount: _$better_call0.StrictEndpoint<"/link-social", {
      method: "POST";
      requireHeaders: true;
      body: _$zod.ZodObject<{
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        provider: _$zod.ZodType<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown, _$zod_v4_core0.$ZodTypeInternals<(string & {}) | "linear" | "huggingface" | "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "railway" | "vercel" | "wechat", unknown>>;
        idToken: _$zod.ZodOptional<_$zod.ZodObject<{
          token: _$zod.ZodString;
          nonce: _$zod.ZodOptional<_$zod.ZodString>;
          accessToken: _$zod.ZodOptional<_$zod.ZodString>;
          refreshToken: _$zod.ZodOptional<_$zod.ZodString>;
          scopes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
        }, _$zod_v4_core0.$strip>>;
        requestSignUp: _$zod.ZodOptional<_$zod.ZodBoolean>;
        scopes: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodString>>;
        errorCallbackURL: _$zod.ZodOptional<_$zod.ZodString>;
        disableRedirect: _$zod.ZodOptional<_$zod.ZodBoolean>;
        additionalData: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodAny>>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        openapi: {
          description: string;
          operationId: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      url: {
                        type: string;
                        description: string;
                      };
                      redirect: {
                        type: string;
                        description: string;
                      };
                      status: {
                        type: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      url: string;
      redirect: boolean;
    }>;
    readonly listUserAccounts: _$better_call0.StrictEndpoint<"/list-accounts", {
      method: "GET";
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            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: "array";
                    items: {
                      type: string;
                      properties: {
                        id: {
                          type: string;
                        };
                        providerId: {
                          type: string;
                        };
                        createdAt: {
                          type: string;
                          format: string;
                        };
                        updatedAt: {
                          type: string;
                          format: string;
                        };
                        accountId: {
                          type: string;
                        };
                        userId: {
                          type: string;
                        };
                        scopes: {
                          type: string;
                          items: {
                            type: string;
                          };
                        };
                      };
                      required: string[];
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      scopes: string[];
      id: string;
      createdAt: Date;
      updatedAt: Date;
      userId: string;
      providerId: string;
      accountId: string;
    }[]>;
    readonly deleteUserCallback: _$better_call0.StrictEndpoint<"/delete-user/callback", {
      method: "GET";
      query: _$zod.ZodObject<{
        token: _$zod.ZodString;
        callbackURL: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>[];
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      success: {
                        type: string;
                        description: string;
                      };
                      message: {
                        type: string;
                        enum: string[];
                        description: string;
                      };
                    };
                    required: string[];
                  };
                };
              };
            };
          };
        };
      };
    }, {
      success: boolean;
      message: string;
    }>;
    readonly unlinkAccount: _$better_call0.StrictEndpoint<"/unlink-account", {
      method: "POST";
      body: _$zod.ZodObject<{
        providerId: _$zod.ZodString;
        accountId: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      use: Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
        session: {
          session: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            userId: string;
            expiresAt: Date;
            token: string;
            ipAddress?: string | null | undefined;
            userAgent?: string | null | undefined;
          };
          user: Record<string, any> & {
            id: string;
            createdAt: Date;
            updatedAt: Date;
            email: string;
            emailVerified: boolean;
            name: string;
            image?: string | null | undefined;
          };
        };
      }>>[];
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      status: {
                        type: string;
                      };
                    };
                  };
                };
              };
            };
          };
        };
      };
    }, {
      status: boolean;
    }>;
    readonly refreshToken: _$better_call0.StrictEndpoint<"/refresh-token", {
      method: "POST";
      body: _$zod.ZodObject<{
        providerId: _$zod.ZodString;
        accountId: _$zod.ZodOptional<_$zod.ZodString>;
        userId: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          description: string;
          responses: {
            200: {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      tokenType: {
                        type: string;
                      };
                      idToken: {
                        type: string;
                      };
                      accessToken: {
                        type: string;
                      };
                      refreshToken: {
                        type: string;
                      };
                      accessTokenExpiresAt: {
                        type: string;
                        format: string;
                      };
                      refreshTokenExpiresAt: {
                        type: string;
                        format: string;
                      };
                    };
                  };
                };
              };
            };
            400: {
              description: string;
            };
          };
        };
      };
    }, {
      accessToken: string | undefined;
      refreshToken: string;
      accessTokenExpiresAt: Date | undefined;
      refreshTokenExpiresAt: Date | null | undefined;
      scope: string | null | undefined;
      idToken: string | null | undefined;
      providerId: string;
      accountId: string;
    }>;
    readonly getAccessToken: _$better_call0.StrictEndpoint<"/get-access-token", {
      method: "POST";
      body: _$zod.ZodObject<{
        providerId: _$zod.ZodString;
        accountId: _$zod.ZodOptional<_$zod.ZodString>;
        userId: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>;
      metadata: {
        openapi: {
          description: string;
          responses: {
            200: {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      tokenType: {
                        type: string;
                      };
                      idToken: {
                        type: string;
                      };
                      accessToken: {
                        type: string;
                      };
                      accessTokenExpiresAt: {
                        type: string;
                        format: string;
                      };
                    };
                  };
                };
              };
            };
            400: {
              description: string;
            };
          };
        };
      };
    }, {
      accessToken: string;
      accessTokenExpiresAt: Date | undefined;
      scopes: string[];
      idToken: string | undefined;
    }>;
    readonly accountInfo: _$better_call0.StrictEndpoint<"/account-info", {
      method: "GET";
      metadata: {
        openapi: {
          description: string;
          responses: {
            "200": {
              description: string;
              content: {
                "application/json": {
                  schema: {
                    type: "object";
                    properties: {
                      user: {
                        type: string;
                        properties: {
                          id: {
                            type: string;
                          };
                          name: {
                            type: string;
                          };
                          email: {
                            type: string;
                          };
                          image: {
                            type: string;
                          };
                          emailVerified: {
                            type: string;
                          };
                        };
                        required: string[];
                      };
                      data: {
                        type: string;
                        properties: {};
                        additionalProperties: boolean;
                      };
                    };
                    required: string[];
                    additionalProperties: boolean;
                  };
                };
              };
            };
          };
        };
      };
      query: _$zod.ZodOptional<_$zod.ZodObject<{
        accountId: _$zod.ZodOptional<_$zod.ZodString>;
        providerId: _$zod.ZodOptional<_$zod.ZodString>;
        userId: _$zod.ZodOptional<_$zod.ZodString>;
      }, _$zod_v4_core0.$strip>>;
    }, {
      user: _$_better_auth_core_oauth20.OAuth2UserInfo;
      data: Record<string, any>;
    } | null>;
  } extends infer T_2 ? { [K in keyof T_2 as K extends keyof T_1 ? never : K]: T_2[K] } : never) & T_1> : never : never : never;
};
//#endregion
export { APIError, type AuthEndpoint, type AuthMiddleware, type DispatchContext, accountInfo, callbackOAuth, changeEmail, changePassword, checkEndpointConflicts, createAuthEndpoint, createAuthMiddleware, createEmailVerificationToken, deleteUser, deleteUserCallback, dispatchAuthEndpoint, error, formCsrfMiddleware, freshSessionMiddleware, getAccessToken, getAuthoritativeSessionFromCtx, getEndpoints, getIp, getOAuthState, getSession, getSessionFromCtx, getShouldSkipSessionRefresh, isAPIError, isStateful, linkSocialAccount, listSessions, listUserAccounts, ok, optionsMiddleware, originCheck, originCheckMiddleware, refreshToken, requestOnlySessionMiddleware, requestPasswordReset, requestPasswordResetCallback, requireOrgRole, requireResourceOwnership, resetPassword, revokeOtherSessions, revokeSession, revokeSessions, router, sendVerificationEmail, sendVerificationEmailFn, sensitiveSessionMiddleware, sessionMiddleware, setPassword, setShouldSkipSessionRefresh, signInEmail, signInSocial, signOut, signUpEmail, unlinkAccount, updateSession, updateUser, verifyEmail, verifyPassword };