import * as _better_auth_core0 from "@better-auth/core"; import { BetterAuthOptions, GenericEndpointContext } from "@better-auth/core"; import { Session, User } from "@better-auth/core/db"; import * as better_call0 from "better-call"; import * as zod from "zod"; import * as zod_v4_core0 from "zod/v4/core"; //#region src/plugins/custom-session/index.d.ts declare module "@better-auth/core" { interface BetterAuthPluginRegistry { "custom-session": { creator: typeof customSession; }; } } type CustomSessionPluginOptions = { /** * This option is used to determine if the list-device-sessions endpoint should be mutated to the custom session data. * @default false */ shouldMutateListDeviceSessionsEndpoint?: boolean | undefined; }; declare const customSession: , O extends BetterAuthOptions = BetterAuthOptions>(fn: (session: { user: User; session: Session; }, ctx: GenericEndpointContext) => Promise, options?: O | undefined, pluginOptions?: CustomSessionPluginOptions | undefined) => { id: "custom-session"; version: string; hooks: { after: { matcher: (ctx: _better_auth_core0.HookEndpointContext) => boolean; handler: (inputContext: better_call0.MiddlewareInputContext) => Promise[] | undefined>; }[]; }; endpoints: { getSession: better_call0.StrictEndpoint<"/get-session", { method: "GET"; query: zod.ZodOptional>; disableRefresh: zod.ZodOptional>; }, zod_v4_core0.$strip>>; metadata: { CUSTOM_SESSION: boolean; openapi: { description: string; responses: { "200": { description: string; content: { "application/json": { schema: { type: "array"; nullable: boolean; items: { $ref: string; }; }; }; }; }; }; }; }; requireHeaders: true; }, Returns | null>; }; $Infer: { Session: Awaited>; }; options: CustomSessionPluginOptions | undefined; }; //#endregion export { CustomSessionPluginOptions, customSession };