import { type UsernameOptions } from "better-auth/plugins"; export type { UsernameOptions } from "better-auth/plugins"; /** * Username 플러그인 스키마 * * better-auth username 플러그인 호출 시 전달합니다: * ```typescript * username({ schema: USERNAME_SCHEMA }) * ``` */ export declare const USERNAME_SCHEMA: UsernameOptions["schema"]; /** * username 플러그인 래퍼 * * Sonamu의 스키마 매핑을 자동으로 병합합니다. */ export declare const username: (options?: UsernameOptions) => { id: "username"; version: string; init(ctx: import("better-auth").AuthContext): { options: { databaseHooks: { user: { create: { before(user: { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; } & Record, context: import("better-auth").GenericEndpointContext | null): Promise<{ data: { displayUsername?: string | undefined; username?: string | undefined; id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }; }>; }; update: { before(user: Partial<{ id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; }> & Record, context: import("better-auth").GenericEndpointContext | null): Promise<{ data: { displayUsername?: string | undefined; username?: string | undefined; id?: string | undefined; createdAt?: Date | undefined; updatedAt?: Date | undefined; email?: string | undefined; emailVerified?: boolean | undefined; name?: string | undefined; image?: string | null | undefined; }; }>; }; }; }; }; }; endpoints: { signInUsername: import("better-auth").StrictEndpoint<"/sign-in/username", { method: "POST"; body: import("zod").ZodObject<{ username: import("zod").ZodString; password: import("zod").ZodString; rememberMe: import("zod").ZodOptional; callbackURL: import("zod").ZodOptional; }, import("zod/v4/core").$strip>; metadata: { openapi: { summary: string; description: string; responses: { 200: { description: string; content: { "application/json": { schema: { type: "object"; properties: { token: { type: string; description: string; }; user: { $ref: string; }; }; required: string[]; }; }; }; }; 422: { description: string; content: { "application/json": { schema: { type: "object"; properties: { message: { type: string; }; }; }; }; }; }; }; }; }; }, { token: string; user: { id: string; createdAt: Date; updatedAt: Date; email: string; emailVerified: boolean; name: string; image?: string | null | undefined; } & { username: string; displayUsername: string; }; }>; isUsernameAvailable: import("better-auth").StrictEndpoint<"/is-username-available", { method: "POST"; body: import("zod").ZodObject<{ username: import("zod").ZodString; }, import("zod/v4/core").$strip>; }, { available: boolean; }>; }; schema: { user: { fields: { username: { type: "string"; required: false; sortable: true; unique: true; returned: true; transform: { input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record | unknown[] | null | undefined; }; }; displayUsername: { type: "string"; required: false; transform: { input(value: import("better-auth").DBPrimitive): string | number | boolean | Date | Record | unknown[] | null | undefined; }; }; }; }; }; hooks: { before: { matcher(context: import("better-auth").HookEndpointContext): boolean; handler: (inputContext: import("better-auth").MiddlewareInputContext) => Promise; }[]; }; options: UsernameOptions | undefined; $ERROR_CODES: { EMAIL_NOT_VERIFIED: import("better-auth").RawError<"EMAIL_NOT_VERIFIED">; UNEXPECTED_ERROR: import("better-auth").RawError<"UNEXPECTED_ERROR">; INVALID_USERNAME_OR_PASSWORD: import("better-auth").RawError<"INVALID_USERNAME_OR_PASSWORD">; USERNAME_IS_ALREADY_TAKEN: import("better-auth").RawError<"USERNAME_IS_ALREADY_TAKEN">; USERNAME_TOO_SHORT: import("better-auth").RawError<"USERNAME_TOO_SHORT">; USERNAME_TOO_LONG: import("better-auth").RawError<"USERNAME_TOO_LONG">; INVALID_USERNAME: import("better-auth").RawError<"INVALID_USERNAME">; INVALID_DISPLAY_USERNAME: import("better-auth").RawError<"INVALID_DISPLAY_USERNAME">; }; }; //# sourceMappingURL=username.d.ts.map